Android Question excel left margin ( resolved )

granthierry

Member
Licensed User
i don't understand,

you write :

Modifying an existing workbook

As noted above it is not possible to directly modify a workbook file. Instead you need to create a new file that will include a copy of the original workbook.
This is done by first loading the existing workbook with ReadableWorkbook.

Then you should create a WritableWorkbook and call Initialize2 instead of Initialize. Initialize2 expects a ReadableWorkbook as the last parameter. It creates a copy of the given ReadableWorkbook.
 

granthierry

Member
Licensed User
You should follow the steps above to create a writable workbook based on an existing xls file.
ok ok
'
workbook2 have 2 sheets Rapport and Engins

Dim workbook2 As ReadableWorkbook
workbook2.Initialize(File.DirAssets ,"rapport_secu_vide.xls")
'
Dim workbook1 As WritableWorkbook
Dim feuille1 As WritableSheet
Dim feuille2 As WritableSheet

workbook1.Initialize2(File.DirRootExternal,"rapport_secu.xls",workbook2 )

the 2 lines above create or reopen the existing sheets ?

feuille1 = workbook1.AddSheet("Rapport", 0)
feuille2 = workbook1.AddSheet("Engins", 1)
 
Top