Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Saving to DBF3 with Excel automation
Message
De
09/03/2005 10:09:11
Salminen Jukka
Js Software Systems
Vaasa, Finlande
 
 
À
09/03/2005 09:37:18
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows NT
Divers
Thread ID:
00993977
Message ID:
00994005
Vues:
28
>>I'm trying to save an Excel97-file to DBF3 like this:
>>
>>WITH ox.activeworkbook
>> .SaveAs(lcFilename, 8)
>> .saved = .t.
>>ENDWITH
>>
>>The only problem is that some numeric fields are empty in the resulting table and I have no clue why. Most of the values in the same column are correct. Has anybody seen this before? Of course I have tried every trick I know to ensure that data in Excel has correct numeric format but this doesn't seem to be enough.
>
>Check if all the numbers are really saved as numeric. Some may be interpreted as text.
>
>Change the allignment to "General" - a real number is right-alligned in this case.

I changed cell formats to "General" and everything seemed to be OK, but conversion failed again. Then I changed cell format to scientific and EVERYTHING WORKED as expected. To be really scientific I changed back to numeric with 2 decimals and the problem came back. What can we learn from this? There is no way to be sure that numbers in Excel are really numbers except when they are formatted as scientific.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform