Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel 95 and Excel 97
Message
 
To
20/07/1998 03:45:33
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00119124
Message ID:
00119182
Views:
20
>>I have a view which I have copied to an XL-file with "COPY to myxl TYPE XL5". I want to clean it up, adjusting columns, change the headers and so on. I have tried to use OLE which works nice but.... when I'm closing the XL-file , I get that annoying "This file was created in another format than Excel97. Do you want to change it to Excel97" or something like that (I am using Swedish version of Office 97).
>>
>>My code looks like this:
>>
>>objExcel = CreateObject("Excel.Application")
>>cFileName = sys(5)+curdir()+alltrim(report_header)+".xls"
>>objBook = objExcel.WorkBooks.Open(cFileName)
>>...
>>some code
>>...
>>objBook.Saveas(cFilename)
>>objBook.Close(.f.)
>>objExcel.Quit
>>
>>I can solve the problem if I change the filename when I save the file and then I delete the original file and rename the new. According to the Helpfile in Excel you might have a parmeter xlNormal to save the file in the correct format to avoid the upgradequestion. How do I use it?
>>
>>/Pierre Unge, Sweden
>
>#define xlExcel5 39
>objBook.Saveas(cFilename,xlExcel5)
>objBook.Close(.t.) && Save changes w/o prompt
>Cetin

Hi Cetin
#define xlExcel5 39 seems like it saves in Excel95 format. How do I save in Excel97 format?
/Pierre
------------- if you cut here, you'll probably destroy your monitor ------------
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform