XLSX-Workbook-Class
XLSX-Workbook-Class copied to clipboard
how create excel from table
hey Im trying to get luck with this and dont works could you gime some advices, thank you in advance.
loExcel = NEWOBJECT("VFPxWorkbookXLSX", "VFPxWorkbookXLSX.vcx") lnWb = loExcel.CreateWorkbook("ArabicTest.xlsx")
always I have this message "Invalid key lenght" im new in foxpro Im jus triyng to create simple program,I have three files dbf on my folder and my finally objecty is run somthing like this ---folder your files from zip (WorkbookXLSX R31.zip)
table1.dbf table2.dbf table3.dbf
set defa to "folder" modi command testprogram
(inside testprogram) loExcel = NEWOBJECT("VFPxWorkbookXLSX", "VFPxWorkbookXLSX.vcx") loExcel.SaveTabletoWorkbook(table1.dbf, "myexcel.xlsx", .T., .T.) loExcel.SaveTabletoWorkbook(table2.dbf, "myexcel.xlsx", .T., .T.) loExcel.SaveTabletoWorkbook(table3.dbf, "myexcel.xlsx", .T., .T.)
Please send me a copy of the tables if possible so that I can reproduce your error message? As for your test code, the fourth parameter in the method (.T.) indicates to save the table to a physical file. So you need to have different xlsx file names or the first two calls to the method has .F. for this parameter which will then add a new sheet. The last call will then save to a physical xlsx file.