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
How about encapsulating HTML table in Excel file? I have checked that this works and I can open it with Excel.
NSURL * documentsDirectory = [NSFileManager.defaultManager URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask].lastObject;
NSURL *file = [documentsDirectory URLByAppendingPathComponent:@"contacts.xls"];
NSString* string = @"FOO BAR
";
[string writeToFile:file.path atomically:YES encoding:NSUTF8StringEncoding error:nil];