This is useful. Yes when I renamed the .xlsx file to .zip, I could see the contents. And sure enough corresponding to each table inside the excel file, I saw a tableN.xml file ( where N is the number of teh table like 1,2,3... )
Eg : D:\tt\Book1.zip\xl\tables directory contains two file named table1.xml and table2.xml for teh excel file that had two embedded tables. It looked like this <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <table xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" id="2" name="Table2" displayName="Table2" ref="B11:E19" totalsRowShown="0"> <autoFilter ref="B11:E19" /> - <tableColumns count="4"> <tableColumn id="1" name="Column1" /> <tableColumn id="2" name="Column2" /> <tableColumn id="3" name="Column3" /> <tableColumn id="4" name="Column4" /> </tableColumns> <tableStyleInfo name="TableStyleDark1" showFirstColumn="0" showLastColumn="0" showRowStripes="1" showColumnStripes="0" /> </table> So yeah, I can use this info to deduce teh table boundaries for each embedded tables. Thanks a lot. --sony --- On Mon, 4/26/10, Nick Burch <[email protected]> wrote: > From: Nick Burch <[email protected]> > Subject: Re: Is it possible to read a table from Excel > To: "POI Users List" <[email protected]> > Date: Monday, April 26, 2010, 10:22 AM > On Mon, 26 Apr 2010, Sony Antony > wrote: > > these are not embedded files. > > But tables created by : > > 1. select a rectangle region of cells > > 2. From Home -> Format as Table > Medium > > I'd suggest you create a very simple file without tables, > and save it. Then, open a copy, and add a very simple table, > and save it. Now, unzip both the files (.xlsx files are > actually a zip file of XML files). > > Finally, see what new files were added for the table, and > see how the normal xml files have been altered. The output > of this process should inform how much work reading the > tables will be. It'll also provide two nice and simple files > for unit testing any future support :) > > Nick > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
