-1

I want to import the excel file in Xcode bundle.

When I click on button then all excel content store in the database then it visible in the table from the database.

TryinHard
  • 4,078
  • 3
  • 28
  • 54
jaskiratjd
  • 729
  • 1
  • 6
  • 16
  • What database are you referring to? And are you talking about a read-only Excel file you want to provide with your app? – rmaddy Aug 20 '15 at 05:09
  • 1
    I am using sqlite for only store he Excel file content – jaskiratjd Aug 20 '15 at 05:45
  • So then you don't need the Excel file in your app bundle. You need a way to get the data from the Excel file into the SQLite file and the SQLite file will be in your bundle. Correct? – rmaddy Aug 20 '15 at 05:57
  • 1
    Thanks, But my point is that excel file download from server then it store in the app then all excel content store in the database then it will show in the table. – jaskiratjd Aug 20 '15 at 06:06
  • @jaskiratjd i don't much aware about server connection, anyway this may help you http://stackoverflow.com/questions/14274492/ios-how-to-make-soap-request-receive-the-concern-response – Shebin Koshy Aug 20 '15 at 13:44
  • You can get the mail attachments in your app easily.. and after getting the file you can read the xls file content using the library i mentioned in my answer – Shebin Koshy Aug 20 '15 at 13:46
  • Your question asks about importing an Excel file into the "Xcode bundle". This sounds like something you want to do while building your app. But the comments indicate that you want to download an Excel file at runtime. Those are two vastly different requirements. Please update your question to make it clear what you want to do. – rmaddy Aug 20 '15 at 14:25

2 Answers2

0

Umm, you can use this: https://github.com/davedelong/CHCSVParser BUT you have to store the file as CSV, not XLSX or XLS

Also, you can store this in the bundle, you just have to call to the bundle, something like this:

NSString *fileName = @"theFileName";
NSString *pathToFile =[[NSBundle mainBundle] pathForResource:fileName ofType: @"csv"];

the @"csv" may need to be @"txt", try it with both

Larry Pickles
  • 4,615
  • 2
  • 19
  • 36
0

These stuffs may help u

File search with specific Extension Objective c

for read (import) a XLS file https://github.com/dhoerl/DHlibxls its working well

if you need to write (export) a XLS file, u use pods https://cocoapods.org/pods/JXLS its also working

if you need to edit a XLSX file https://github.com/renebigot/XlsxReaderWriter (i'm not sure, because i don't work with it)

If you just need to show the files(XLS/XLSX) to the users, you can use a UIWebView

Community
  • 1
  • 1
Shebin Koshy
  • 1,182
  • 8
  • 22