keepingbusy
Programmer
Hi
In 2007 I posted a thread (thread184-1403060) which at the time, resovled my issue. Recently I used the below code for another project with similar requirements but for whatever reason is not deleting the first row in the spreadsheet created which contains the field names.
My goal here is to remove row 1 from the spreadsheet so the field names do not appear.
Here is the strange thing, when the file opens automatically, the fields are not shown in the spreadsheet. When you the process is complete, if you open the file in the folder where it has been created, the field names are shown in that file.
Has something changed since the introduction of Excel 2007 or am I missing something?
I'm using VFP9 and Office 2007.
Thanks guys
Lee
In 2007 I posted a thread (thread184-1403060) which at the time, resovled my issue. Recently I used the below code for another project with similar requirements but for whatever reason is not deleting the first row in the spreadsheet created which contains the field names.
Code:
STORE "MyReport" TO mfile
EXPORT TO &mfile TYPE XLS
STORE SYS(5)+SYS(2003)+"\"+TRIM(mfile)+".xls" TO mfileopen
oxl = CREATEOBJECT("Excel.Application")
OWORKBOOK = oxl.WORKBOOKS.OPEN(mfileopen)
ORANGE = OWORKBOOK.SHEETS(1).ROWS(1)
ORANGE.DELETE()
oxl.QUIT
RELEASE oxl
Here is the strange thing, when the file opens automatically, the fields are not shown in the spreadsheet. When you the process is complete, if you open the file in the folder where it has been created, the field names are shown in that file.
Has something changed since the introduction of Excel 2007 or am I missing something?
I'm using VFP9 and Office 2007.
Thanks guys
Lee