Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP7/Excel Bug
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00586616
Message ID:
00586979
Vues:
13
George,

It seems related to that VFP7 has extended variable types support.
The same result in VFP6 and VFP7 you can get if you use
xlapp.workbooks(1).sheets(1).cells(1, 1).text
instead of ...value


>It seems that an empty cell in an Excel spreadsheet returns different values, depending on whether it's being read from VFP7 or VFP6.
>
>STEPS TO REPRODUCE:
>I created a c:\test.xls with nothing in cell A1.
>
>Then, I ran the following program:
>
LOCAL XLApp, x, lcFileName
>
>lcfilename = 'c:\test.xls'     && Your filename here.
>
>XLApp = CreateObject('Excel.application')
>XLApp.WorkBooks.Open(lcFileName)
>
>x = xlapp.workbooks(1).sheets(1).cells(1, 1).value
>=messagebox(vartype(x))
>
>XLApp.quit()
>
>
>RESULTS:
>I get "C" in VFP6, and "X" (.NULL.) in VFP7.
>
>EXPECTED RESULTS:
>Same in both VFP6 and VFP7 [Should remain C(0), not be changed to .NULL.]
>
>- George
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform