How can I open a *.doc, *.xls file in an iPhone App?
How a document, Excel, presentation file can be opened in a iPhone app. Using a Web view we can open the *.pdf file using the following lines of code:
NSString *thePath = [[NSBundle mainBundle] pathForResource:@"iPhone_User_Guide" ofType:@"pdf"];
if(thePath) {
NSData *pdfData = [NSData dataWithContentsOfFile:thePath];
[webview loadData:pdfData MIMEType:@"application/pdf"
开发者_开发百科 textEncodingName:@"utf-8" baseURL:nil];
}
How can we open doc, ppt, xls files in a webview this way?
精彩评论