Properly parsing CSV (comma separated value) files can be difficult due to the memory limitations on iOS devices, and the need to handle different encoding formats.
Here’s a library from Dave DeLong called CHCSVParser that can parse and create CSV files properly on iOS devices.
CHCSVParser avoids memory issues by only parsing a section of the file at a time, and lets you easily deal with different delimiters, and encoding formats. You can supply the file to be parsed or provide an NSString or NSStream containing the CSV information.
You can also save data to a CSV format with your choice of delimiter.
You can download CHCSVParser on Github here.
If you’re looking to download and parse a remote CSV file you may want to look at this AFNetworking extension that uses CHCSVParser to perform the CSV parsing.
If you’re having issues with parsing/saving CSV data this library makes it easy.
- Open Source: Easily Extensible Objective-C Math Parser Library
- Tutorial: Fetching And Parsing JSON And XML With Simple Reusable Classes
- Tutorial: Parsing HTML On With The Objective-C LibXML Wrapper Hpple
- Open Source: New XML Parsing Library With A Highly Readable Easy To Maintain Syntax
- Tutorials And Examples: Creating PDFs On iOS Using Quartz, UIKit, And libHaru
Original article: Open Source Objective-C Library For Easily Parsing/Writing CSV Files
©2013 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.





