Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Field width problems with Excel
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00788722
Message ID:
00788827
Views:
33
Consider VFP Import command instead

>I am trying to save an Excel spreadsheet as a VFP table. The problem I am running into is the width of the fields in MyNewTable are incorrect. The field width for all character and numeric fields is being set to 9. Not so bad for the numeric fields, but all of my character fields are being truncated. This is the code I am using:
>
>oExcel=createobject('Excel.Application')
>
>with oExcel
>
> .DisplayAlerts = .F.
> .WorkBooks.open(MyXLSFile)
> .ActiveWorkBook.SaveAs(MyNewTable,8) && saves Excel file as VFP table
> .ActiveWorkBook.Saved = .T.
> .Quit()
>
>endwith
>
>How can I make the field width match the actual width of my character colums from my spreadsheet???
>
>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform