Author | Topic: HBLibXL for Excel Files | |
---|---|---|
César Calvo | HBLibXL for Excel Files on Sat, 17 Jun 2017 12:53:05 +0200 Hello friends. I am starting with HBLibXl With this I create a xlsx file and Ok (1_Prueba_Ok.xlsx): FOR TO CREATE A BOOK cFil := "Prueba" oBook := xlCreateXLSXBook(cName,ckey) IF oBook # NIL oSheet := oBook:BookAddSheet("Hoja1") oBook:BookSave( cFil ) oBook:destroy() ELSE msgbox("Error LibXL.DLL","Error") ENDIF //------------------------------------------------------------------------------------------------ Next of this I want to open and manage the xlsx file for add things (I mean the work, example add Hoja2). 2_PruebaNo_Ok.xlsx If I do this the sheet Hoha1 is deleted. ABRIR UNA HOJA Y MANEJAR DICHA HOJA cFil := "Prueba" oBook := xlCreateXLSXBook(cName,ckey) IF oBook # NIL oBook:BookLoad(cFil) oBook:BookInsertSheet(,"Hoja2",) oBook:BookSave(cFil) oBook:destroy() ELSE msgbox("Error LibXL.DLL","Error") ENDIF I don´t know why the shhet Hoja1 is deleted What wrong I am doing? Best. César. 1_Prueba_OK.xlsx 2_Prueba_No_OK.xlsx | |
César Calvo | Re: HBLibXL for Excel Files on Sun, 25 Jun 2017 21:10:59 +0200 Hubert helped me. It works fine. Regards. César. "César Calvo" escribió en el mensaje de noticias:11e3862c$29de04c8$8b770@news.alaska-software.com... Hello friends. I am starting with HBLibXl With this I create a xlsx file and Ok (1_Prueba_Ok.xlsx): FOR TO CREATE A BOOK cFil := "Prueba" oBook := xlCreateXLSXBook(cName,ckey) IF oBook # NIL oSheet := oBook:BookAddSheet("Hoja1") oBook:BookSave( cFil ) oBook:destroy() ELSE msgbox("Error LibXL.DLL","Error") ENDIF //------------------------------------------------------------------------------------------------ Next of this I want to open and manage the xlsx file for add things (I mean the work, example add Hoja2). 2_PruebaNo_Ok.xlsx If I do this the sheet Hoha1 is deleted. ABRIR UNA HOJA Y MANEJAR DICHA HOJA cFil := "Prueba" oBook := xlCreateXLSXBook(cName,ckey) IF oBook # NIL oBook:BookLoad(cFil) oBook:BookInsertSheet(,"Hoja2",) oBook:BookSave(cFil) oBook:destroy() ELSE msgbox("Error LibXL.DLL","Error") ENDIF I don´t know why the shhet Hoja1 is deleted What wrong I am doing? Best. César. |