General information
Category:
COM/DCOM and OLE Automation
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only