-
rapidcsv.h
Rapidcsv is a C++ header-only library for CSV parsing. While the name admittedly was inspired by the rapidjson project, the objectives are not the same. The goal of rapidcsv is to be an easy-to-use CSV library enabling rapid development.
Rapidcsv is implemented using C++11.
-
Installation
Simply copy src/rapidcsv.h to your project/include directory and include it.
By default rapidcsv treats the first row as column
headers
, and the first column is treated asdata
.
This allows accessing columns using their labels, but not rows or cells (only using indices). In order to treat the first column as row headers one needs to use LableParams
and set pRowNameIdx
to 0.
The internal cell representation in the Document
class is using std::string
and when other types are requested, standard conversion routines are used. All standard conversions are relatively straight-forward, with the exception of char
for which rapidcsv interprets the cell’s (first) bytes as a character.