Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have a sample iOS app that generates multiple reports using data in the app. Those reports looks exactly similar to Microsoft Excel spreadsheets like this.

enter image description here

How can I generate the similar using objective-c. I don't have any idea about how can I create the such grid-view. Do we have any objective-c supported framework or anyhting similar to UITableView to create such spreadsheet.

Any help is greatly appreciated.

like image 844
hp iOS Coder Avatar asked Feb 15 '13 10:02

hp iOS Coder


1 Answers

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.

like image 181
JP Illanes Avatar answered Nov 15 '22 19:11

JP Illanes