Here are illustrations of the operation of csv2odf. The wiki may not look exactly like a document, but maybe you will get the idea of what the various options do.
Here is how the program works without options.
2011-06-14, "Sweep floor", 30 2011-06-15, "Count beans", 60 2011-07-10, "Pickup chips", 45
Micro Management Report
Date | Task | Minutes |
---|---|---|
2000-01-01 | Dummy | 0 |
Micro Management Report
Date | Task | Minutes |
---|---|---|
2011-06-14 | Sweep floor | 30 |
2011-06-15 | Count beans | 60 |
2011-07-10 | Pickup chips | 45 |
The contents of the csv data file has been inserted into the document. The formatting in the document has also been applied to the csv data.
csv2odf data.csv template.odt output.odt
Click on the option you are interested in to see an example.
-h : displays help information
-v : verbose mode
-H : insert the first csv row into the header
-c <char> : use char as delimiter instead of comma
--comment=<text> : replace [csv2odf-comment] within the document with <text>
-o <spec> : specify column order: 2,1,3 = second csv column is first. Also use to leave the contents of a template column: 1,2,,3,4 = the 3rd template column is not overwritten. Useful if a column contains a formula. The formula cell references will be offset to the correct row.
-s <n> : start reading at the nth row of the csv file
-e <n> : end reading at the nth row of the csv file
-S <n;gt; : skip the first n rows of the template file, the header will be the next row after those skipped
-t <n> : specify which tab or table to add data to, default first table
-d <fmt> : date format within csv data is specified by fmt string, see -D for codes
-D : show a list of date format codes
-q : suppress all warning messages
-x : create an xml output file instead of odf
-n : do not merge the data into output, use with -x to extract template xml codes
--input=<file> : specify the csv data file location
--template=<file> : specify the tempate file location
--output=<file> : specify the output file location
-V : display version number
-z : display debugging information
Wiki: Main_Page
Wiki: Option_H_Example
Wiki: Option_S_Example
Wiki: Option_c_Example
Wiki: Option_comment_Example
Wiki: Option_d_Example
Wiki: Option_e_Example
Wiki: Option_o_Example
Wiki: Option_s_Example