attachment csv file in MFMailComposeViewController
In my app i sending a file as csv format it's working fine if i open in "neo-office" but it's not opening properly in "MS-office". I am using below code t开发者_Go百科o send csv file
NSString *str_mail = [[NSString alloc] initWithString:[NSString stringWithFormat:@"Event Name;Event 1\n status;open\nstart date;19-May-2001\nend date;22-May-2001\nno of friends;2\ntotal;2,00 AUDn\n\n"]];
NSData *myData = [str_mail dataUsingEncoding:NSUTF8StringEncoding];
[mailController addAttachmentData:myData mimeType:@"text/csv" fileName:@"test.csv"];
精彩评论