Private Sub GetPictures (jworkbook As JavaObject) As List
Dim lst As List = jworkbook.RunMethod("getAllPictures", Null)
Dim images As List
images.Initialize
For Each pic As JavaObject In lst
Dim data() As Byte = pic.RunMethod("getData", Null)
Dim in As InputStream
in.InitializeFromBytesArray(data, 0, data.Length)
Dim img As Image
img.Initialize2(in)
images.Add(img)
Next
Return images
End Sub
Usage example:
B4X:
Dim workbook As XLWorkbookWriter = xl.CreateWriterFromTemplate("C:\Users\H\Downloads\1.xlsx", "")
For Each bmp As B4XBitmap In GetPictures(workbook.jWorkbook)
'
Next
It doesn't include the picture position. This is more complicated and there could be all kinds of different cases.
I can get the picture file, but I don't konw how to get the location of picture. I can't find the correct method in POI. InputStream is= new FileInputStream("test.xlsx"); XSSFWorkbook wo...
stackoverflow.com
Just getting all the pictures is ... useless, without address.
But it seems, most of POI classes are not wrapped, so it's impossible now to get...