Skip to content
Prev 268238 / 398502 Next

Reading XML files masquerading as XL files

Hi Dennis

 That those files are in a directory/folder suggests that they were extracted from their
zip (.xlsx) file.  The following are the basic contents of the .xlsx file
    1484  02-28-11 12:48   [Content_Types].xml
      733  02-28-11 12:48   _rels/.rels
      972  02-28-11 12:48   xl/_rels/workbook.xml.rels
      846  02-28-11 12:48   xl/workbook.xml
      940  02-28-11 12:48   xl/styles.xml
     1402  02-28-11 12:48   xl/worksheets/sheet2.xml
     7562  02-28-11 12:48   xl/theme/theme1.xml
     1888  02-28-11 12:48   xl/worksheets/sheet1.xml
      470  02-28-11 12:48   xl/sharedStrings.xml
      196  02-28-11 12:48   xl/calcChain.xml
    21316  02-28-11 12:48   docProps/thumbnail.jpeg
      629  02-28-11 12:48   docProps/core.xml
      828  02-28-11 12:48   docProps/app.xml
If most of these are present, I would explore whether the sender could give them to you without
unzipping them or make sure that your software isn't automatically unzipping them for you.


Note that not all files in the .xlsx are sheets and the WorkSheet is the
basic entity that corresponds to a .csv file.

The xlsx package and my REXcelXML packages will probably get you a fair bit of the way
in extracting the content, but they probably will need some tinkering since they expect
the different components to be in a zip archive.
There is also an office2010 package which seems to have an overlap with what is in
xlsx, and ROOXML, RWordXML and RExcelXML.

  D.
On 8/10/11 7:26 AM, Dennis Fisher wrote: