Android Question b4a code under save file excell

sajjad12345

New Member
'AddPermission(android.permission.WRITE_EXTERNAL_STORAGE) ' Allows an application to write to external storage.
'AddPermission(android.permission.READ_EXTERNAL_STORAGE) ' Allows an application to read from external storage.

code under save file excell
add liberry WritableWorkbook

Sub Button1_Click

Dim newWorkbook As WritableWorkbook
newWorkbook.Initialize(File.DirRootExternal, "1.xls")
Dim sheet1 As WritableSheet
sheet1 = newWorkbook.AddSheet("name sheetMovies", 0)

Dim cell As WritableCell
Dim cell2 As WritableCell
Dim cell3 As WritableCell

cell.InitializeText(0,0,"row0,0")
cell2.InitializeText(1,0,"row-clun-1-0")
cell3.InitializeText(2,0,"row clun 2-0")
sheet1.AddCell(cell)
sheet1.AddCell(cell2)
sheet1.AddCell(cell3)
ToastMessageShow("ok",True)



'Must call write and close to save the data.
newWorkbook.Write
newWorkbook.Close
'Must call write and close to save the data.



End Sub
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…