Yes, I was able to get your code to work with HSSF, which only works for one level of embedded objects.
Since my data may have more, I created a class with an initial HSSFWorkbook assignment like below prior to getting the embedded object list and the workbook created from the FileInputStream constructor uses the fileSys.getRoot for the DirectoryNode, which then fails when it calls the HSSFDataObject obj.getDirectory() to get the current directory node with a null value. HSSFWorkbook workbook = new HSSFWorkbook(dirNode, fileSys, false); Using this constructor when creating the initial workbook with your code also failed when assigning the dirNode to fileSys.getRoot(). What I'm trying to do is instead of creating a second workbook in the code like your embeddedWorkbook line, I am instantiating another version of my class which has a constructor taking the DirectoryNode and filesystem as inputs to create the embedded workbook and have access to it's content. MSB wrote: > > > PS Have you managed to extract embedded objects from a worksheet using > HSSF? > > -- View this message in context: http://www.nabble.com/read-embedded-objects-in-a-word-doc-tp24643756p24650714.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
