B4J Question JPoi Excel printarea

sdleidel

Active Member
Licensed User
Longtime User
Hi,

how i can get the "getPrintArea" from a (Excel)sheet and how i can set it ?

Thanks
Sascha

Thats not working :(

B4X:
Sub GetPrintArea(Sheet As PoiSheet) As String
    Dim jo As JavaObject = Sheet
    Return  jo.RunMethod("getPrintArea", Array(0)) ' From sheet 0
End Sub


The POI Doc says:
getPrintArea
java.lang.String getPrintArea(int sheetIndex)
Retrieves the reference for the printarea of the specified sheet, the sheet name is appended to the reference even if it was not specified.
Parameters:sheetIndex - Zero-based sheet index (0 Represents the first sheet to keep consistent with java)Returns:String Null if no print area has been defined
 

sdleidel

Active Member
Licensed User
Longtime User
?‍♂️ Ok ... Sorry... I found the Problem...


B4X:
Sub GetPrintArea(Sheet As PoiWorkbook, site As Int) As String
    Dim jo As JavaObject = Sheet
    Return  jo.RunMethod("getPrintArea", Array(site))
End Sub
 
Upvote 0
Top