I am using Apache POI with Java 1.8 in my application. In my application, I try to read Excel and get the embedded objects.
I need to know how to get the row number and file extensions for each embedded OLE object.
Workbook workbook = WorkbookFactory.create(new File(path));
XSSFWorkbook fWorkbook = (XSSFWorkbook) workbook;
List<PackagePart> embeddedDocs = fWorkbook.getAllEmbedds();
To get embeddedDocs.getContentType
Which returns the application/vnd.openxmlformats-officedocument.oleObject
.
But is there anyway where we can get the file extensions (i.e pdf,ppt,mp3) as which is returned by the MimeType. And which way to get row number of embedded objects. Any ideas / Coding logic to resolve this will be very useful.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…