Skip to content

Opening Doc, Excel, ppt files in iPhone

November 23, 2010

Once I figured out the way to open pdf files in iPhone and iPad, I was in  a lookout for opening *.doc, *.xls, *.ppt files. Finally after a bit of digging, got to know it. Tried the same code in iPad, it did not work..I also tried opening Open Office document files and it did not work.

Here is the code for you.


NSString *path = [[NSBundle mainBundle] pathForResource:@"C.doc" ofType:nil];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webview loadRequest:request];

Advertisements

From → iPhone

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: