Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exporting To Excel
Message
From
19/05/2005 12:22:06
 
 
To
19/05/2005 10:18:45
Stan Vaninger
Mitek Industries, Inc
Missouri, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01015815
Message ID:
01015865
Views:
21
>I am using Office 2000.
>
>Export To (lcPathFile) Type XlS
>When I do an export to Excel with type XLS (as shown above) and then open the spreadsheet with excel and save it, I get a dialog that says, "MyFile.xls is a Microsoft Excel 2.1 Worksheet. Do you want to overwrite it with the latest Excel format?"
>
>Export To (lcPathFile) Type Xl5
>When I do an export to Excel with type XL5 and then open the spreadsheet with excel and save it, I get a dialog that says, "MyFile.xl5 is a Microsoft Excel 5.0/95 Workbook. Do you want to overwrite it with the latest Excel format?"
>
>But the XLS and XL5 file types are the only two Excel types in the VFP9 Help file. Both types seem to produce what sounds like ancient formats. Is there a undocumented type that produces an Excel spreadsheet that Office 2000 likes?
>
>Thanks,
>Stan




Stan,

Unfortunately that's it. Those two old drives are all we have. What I always do is, after exporting to Excel, open it through Automation and, apart from prettying it up, do an Excel.SaveAs(proper params here). This saves it in the current Excel version.
#DEFINE xlNormal -4143
...
cXLSName = "WhateverSheetNameIwant.xls"
lnFileFormat = xlNormal
lcPassword = ""
lcWriteResPassword = ""
llReadOnlyRecommended = .F.
llCreateBackup = .F.
loWorkbook.SaveAs(cXLSName, lnFileFormat, lcPassword, ;
  lcWriteResPassword, llReadOnlyRecommended, llCreateBackup)
loExcel.Quit


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform