I'm writing a Cocoa application and I'm trying to export to the Excel XML format (ISO/IEC 29500-1) which is basically a zip file with a bunch of XML files in it named with a .xlsx
extension.
I've tried generating AppleScript and using NSAppleScript
to create the Excel file, which works, but is slow and the user has to have Excel installed on their machine.
I was able to create a simple .xlsx Excel file by writing the XML to files in Objective C and zipping them up and renaming the zip to .xlsx
. Excel could open the file, but Numbers threw an error trying to open the file I created. It seems Excel must have implemented all (or most of) the ISO/IEC spec, while Numbers may only open the Excel flavored version.
How to create working Excel files using Cocoa and Objective-c?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…