Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Field width problems with Excel
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Field width problems with Excel
Divers
Thread ID:
00788722
Message ID:
00788722
Vues:
51
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform