i want to generate the application to create the excel file in iPhone sdk. can anybody suggest me to create it.
Well, the right guy saw your post! There is an open source C++ library on SourceForge, xlslib, that will do exactly what you need.
But wait - there's even more! There is a Objective-C wrapper to that library - its a bit out of date but recently someone reported that they got it to work on iOS.
The two people supporting this library appear to be quite responsive to users, so its likely that they will continue to support the ObjectiveC wrapper if people are using it.
That said, there is no out-of-the-box library/framework to just stick in your project. You will have to spend some time, maybe even a day or two, to get the thing to build and run on iOS. If you are in a hurry you will have to spend the time. If you are patient you may get help on it.
EDIT: there is an ObjectiveC framework using this library: JXLS.
Another option if your Excel file isn't very complicated would be to use an HTML table. I've tried it and it works pretty well.
NSURL * docsDir = [NSFileManager.defaultManager URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask].lastObject;
NSURL *file = [docsDir URLByAppendingPathComponent:@"sample.xls"];
NSString* htmlString = @"<table>
<tr>
<th bgcolor="#00FF00">Month</th>
<th bgcolor="red">Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
</table>";
[htmlString writeToFile:file.path atomically:YES encoding:NSUTF8StringEncoding error:nil];
Once created the file, attach it to an e-mail with XLS extension and open it with Excel.
To try if this solution fits your needs you could create plain text file with your "HTML template" and open it with Excel. Once checked create it programmatically :)
I found a link on github. Just add these few files & follow instruction for integrating code(easy to integrate).
Here is Link
https://github.com/andreac/RSSheet
Please convert these files into ARC to avoid crashing due to memory management. Hope it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With