Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VfpxWorkBookXlsx
Message
From
29/09/2020 21:25:49
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
01676306
Message ID:
01676316
Views:
71
>I am troubleshooting an issue with converting a cursor to an XLSX file using Greg Green's tool, VfpxWorkBookXlsx.
>
>When I convert a "good" cursor, using the method SaveTableToWorkbook(), I check the returned object values. The docs say the following:
>
>Return Value:
 >           Return object:
 >                       loReturn.Workbook Workbook Id; zero on failure
 >                       loReturn.Sheet Sheet Id; zero on failure
>
>
>In my case, both the Workbook and Sheet properties return 0 (zero) but no error. And the resulting Excel file seems to be good. Why they the method returns 0 (zero)?

Can you provide an example to reproduce this behavior? Looking at the code, it sets the return values just before the RETURN statement:
loReturn.Sheet    = lnSh
loReturn.Workbook = lnWB
this.RestoreVFPSettings()
RETURN loReturn
The values for lnSh and lnWB if set to zero, the workbook is not created (there are IF statements to prevent this from occurring); these values have to be set to non-zero for the workbook to be created. BTW -- I have changed the code above and have a new version in Beta testing.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform