I am trying to load a .xls Ms-Excel file in my WebView
it showing error through didFailWith error
delegates method the problem is i am unable to understand this error please help me.
Here is my code:-
-(void)loadDocument:(NSString*)documentName inView:(UIWebView*)webView
{
NSString *path = [[NSBundle mainBundle] pathForResource:documentName ofType:nil];
NSURL *url = [NSURL fileURLWithPath:path];
NSData *data = [NSData dataWithContentsOfURL:url];
[webView loadData:data MIMEType:@"application/vnd.ms-excel" textEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:@""]];
}
And Error is:-
EXCEPTION CPMessageException: (null)
2013-09-25 12:35:47.051 ewApps-dev18[1111:c07] [ReportsWebView_iPhone.m:116] did fail with error:- Error Domain=OfficeImportErrorDomain Code=912
"Unknown exception" UserInfo=0x97a4970
{NSErrorFailingURLKey=x-apple-ql-id://B7559867-1117-4FF5-8F61-015464D8E2C7/x-apple-ql-magic/, NSErrorFailingURLStringKey=x-apple-ql-id://B7559867-1117-4FF5-8F61-015464D8E2C7/x-apple-ql-magic/, NSLocalizedDescription=Unknown exception}.