Information générale
Catégorie:
COM/DCOM et 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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement