How to properly assemble a valid xlsx file from its internal sub-components?

BujinkanNinja

New Member
I'm trying to create an xlsx file programmatically on iOS. Since the internal data of xlsx files is basically stored in separate xml files, I tried to recreate xlsx structure with all its files and subdirectories, compress them into a zip file and set its extension to xlsx. I use GDataXML parser/writer for creating all the necessary xml files. However, the file I get can't be opened as xlsx file. Even if I rip all the data from a valid xlsx file, create all the xml files manually by copying data from the original xml files and compress them manually, I can't recreate a valid xlsx file.The questions are:
  • is xlsx really just an archive containing xml files?
  • how do I create a valid xlsx file programmatically if I can't just compress xml files into zip file and set its extension to xlsx?
 
Back
Top