Reputation: 652
In my ios application i am trying to parse the excel file given by the user and do something with the data later on.. which i dint decided yet.. I have searched about how to parse excel file in iOS, and find that many are saying convert the excel file to csv file and parse that, i also find a framework DHlibxls and tried using it, after cloning it from github, it has also given a test project on how to parse excel files and it is also working fine, but the problem is in that test project i tried to replace the existing test.xls file with another test file then after i tried to run it gave an exception and the app crashed.
the new file i added is .xlsx file, so i thought that may be it wont read the .xlsx file , so then i tried to add a small .xls file but still the exception occured, after that i tried to add the same test file given in the folder but by changing the name to test2.xls, but the exception is still there. I cant understand the problem.
Many are saying that convert the .xls file to .csv file, how to convert it in ios , is there a library or method in ios to convert the .xls file to .csv dynamically while the app is running..Thank you
Upvotes: 0
Views: 3203
Reputation: 3098
You can use XlsxReaderWriter library...It is free and usefull for read & write!
Now, you can import BRAOfficeDocumentPackage.h in your code.
It also supports Swift:
Upvotes: 1
Reputation: 39988
While adding a file make sure that it's membership is checked as in the below screen.
Or for existing files in xcode do the following to add it in the target. Select the file and check the file inspector and then check the target membership.
Upvotes: 1