Ms Excel Type Spreadsheet Creation Using Objective-C for iOS App

MS Excel type spreadsheet creation using objective-c for iOS app

I have never seen anything like this open source, and I don't think there is. So I would try to hand make it. I think there are three ways to go:

  • HTML: This should be the easier way to go. Using a UIWebView to render some pre generated HTML/CSS you can create quite easily that spreadsheet (or even use a JS library).

  • Using a grid view: Either using the Apple solution (UICollectionView, since iOS 6.0) or a third party (AQGridView,GMGridView, etc. There are several, I have only used AQGridView, and its quite complete). The complexity here, is that this libraries are usually developed to show a grid of UIViews, so it's no easy to make them look like the spreadsheet you want.

  • CoreGraphics: This is much more complex, as you need to draw all the lines, and then draw the fields, but is by far more flexible. I've developed a library for plotting a Radar Chart (RPRadarChart) using Core Graphics, and it wasn't that hard. I have a github repo with all the code that I used to learn Core Graphics, if you want, take a look at it: RPCGSandbox

Good luck, and if you find a better solution, please let us know.

getting nsstrings into an excel spreadsheet?

A. The easiest way is to generate a CSV file -- not even kidding. Excel can open it natively. If you really want a .xlsx file, though, you'll probably have to use a third party library or write your own. Maybe not as hard as it sounds.

B. It's not possible to send attachments from the iPhone. The easiest way to export anything is to upload it to a web server and have your user download it separately. Remember that the iPhone is a phone, and isn't really meant for enterprise applications.

How to make a table in iOS?

Although I'm not entirely certain if it's possible to build an excel style table, I would assume that it is since you can customize tables a lot. Apple has lots of great documentation about how to build tables and customize them accordingly. If it can be done, you'll find out how to do it from one of these links:

Documentation on UITableViewController:
https://developer.apple.com/library/ios/documentation/uikit/reference/UITableViewController_Class/Reference/Reference.html

Documentation on UITableView:
https://developer.apple.com/library/ios/documentation/uikit/reference/UITableView_Class/Reference/Reference.html

Documentation on UITableViewCell:
https://developer.apple.com/library/ios/documentation/uikit/reference/UITableViewCell_Class/Reference/Reference.html

Read data from Excel file in Objective-C (iPhone)

Actually, there is such a project - its called libxls on source forge. There is a ObjectiveC class interface to the project as well. With this project you can open an excel file, and read most of the information in it (cell values as well as the file's properties).

In addition there is an iOS Objective C interface to the library.



Related Topics



Leave a reply



Submit