B4J Question jPOI - Excel change cells

Tayfur

Well-Known Member
Licensed User
Longtime User
I used for delete row on sheet.

B4X:
Dim wb As PoiWorkbook
dim Sheet_SIPARIS As PoiSheet

    wb.InitializeExisting("Foldername","file name","")
    If wb.IsInitialized Then
    Sheet_SIPARIS=wb.GetSheet(0)
    Dim row As PoiRow
    For i=Sheet_SIPARIS.FirstRowNumber+1 To Sheet_SIPARIS.LastRowNumber
        row=Sheet_SIPARIS.CreateRow(i) ' this line delete line on selected sheet
    Next
end if
wb.save("Foldername","file name")
wb.Close


I used for change cell row on sheet.

B4X:
Dim wb As PoiWorkbook
dim Sheet_SIPARIS As PoiSheet

    wb.InitializeExisting("Foldername","file name","")
    If wb.IsInitialized Then
    Sheet_SIPARIS=wb.GetSheet(0)
    Dim row As PoiRow
   
        row=Sheet_SIPARIS.getRow(1) ' this line read line on selected sheet
    Dim poicells As PoiCell 
poicells= row.CreateCellString(0, DateTime.Date(datetime.now)) 'this line change volues on cell(1,0) 
end if
wb.save("Foldername","file name")
wb.Close
 
Upvote 0

Tayfur

Well-Known Member
Licensed User
Longtime User
thank for helps.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…