Aquileo | Recent changes to wikihttps://sourceforge.net/p/csv2odf/wiki/2024-03-01T17:27:50.040000ZRecent changes to wikiAquileo | Main_Page modified by Larry Jordan2024-03-01T17:27:50.040000Z2024-03-01T17:27:50.040000ZLarry Jordanhttps://sourceforge.net/u/w322/https://sourceforge.neta793ec54efd1679eff6e4fb2e8402ca61126c2ba<div class="markdown_content"><pre>--- v65 +++ v66 @@ -10,11 +10,13 @@ ## Requirements -csv2odf requires [Python](http://www.python.org/) 2.6 or later. [OpenOffice.org](http://www.openoffice.org), [LibreOffice](http://www.libreoffice.org) or Microsoft Office are also needed to create templates and view output files. It can run on any operating system that Python and OpenOffice.org run on, including Linux, Mac, and Windows. +csv2odf requires [Python](http://www.python.org/) 3.5 or later. [OpenOffice.org](http://www.openoffice.org), [LibreOffice](http://www.libreoffice.org) or Microsoft Office are also needed to create templates and view output files. It can run on any operating system that Python and OpenOffice.org run on, including Linux, Mac, and Windows. -csv2odf has been tested on Linux with python 2.6, 2.7, 3.0-3.4; and with OpenOffice.org 2.4, 3.0, 3.1 and 3.2. It has been tested on Windows XP with Python 2.7 and 3.2-3.4. +csv2odf has been tested on Linux with python 3.11; and with OpenOffice.org 2.4, 3.0, 3.1 and 3.2. It has been tested on Windows XP with Python 3.2-3.4. If you test with other versions of these programs, you can [send your results](http://sourceforge.net/sendmessage.php?touser=635673). + +If wish to use with Python 2, try [csv2odf v2.09](https://sourceforge.net/projects/csv2odf/files/csv2odf-2.09/). ## Download @@ -99,6 +101,7 @@ | csv2odf Version | Release Date | Requires Python Version | Notes | |:----------------|:-------------|:------------------------|:------| +|2.10 | 2024-02-24 | 3.5+ | Changes to make compatible with Python 3.11. Removed Python 2 support. | |2.09 | 2017-07-01 | 2.7-3.5+ | Added option to specify csv file encoding | |2.08 | 2017-02-14 | 2.7-3.4+ | Bugfixes: unicode regression, Fixed offset of filters when options are inside template. | |2.07 | 2017-02-05 | 2.7-3.4+ | Bugfix for memory error with xlsx and large csv files. | </pre> </div>Aquileo | Main_Page modified by Larry Jordan2017-07-02T23:45:07.525000Z2017-07-02T23:45:07.525000ZLarry Jordanhttps://sourceforge.net/u/w322/https://sourceforge.netc1c4f0dd340952f984b6e422c1a0b632e54865cd<div class="markdown_content"><pre>--- v64 +++ v65 @@ -99,11 +99,11 @@ | csv2odf Version | Release Date | Requires Python Version | Notes | |:----------------|:-------------|:------------------------|:------| -|2.09 | 2017-07-01 | 2.6-3.5+ | Added option to specify csv file encoding | -|2.08 | 2017-02-14 | 2.6-3.4+ | Bugfixes: unicode regression, Fixed offset of filters when options are inside template. | -|2.07 | 2017-02-05 | 2.6-3.4+ | Bugfix for memory error with xlsx and large csv files. | -|2.06 |2016-12-12 | 2.6-3.4+ | Bugfix for error processing unicode. | -|2.05 |2016-04-26 | 2.6-3.4+ | General improvements and bug fixes for handling unicode and xlsx. | +|2.09 | 2017-07-01 | 2.7-3.5+ | Added option to specify csv file encoding | +|2.08 | 2017-02-14 | 2.7-3.4+ | Bugfixes: unicode regression, Fixed offset of filters when options are inside template. | +|2.07 | 2017-02-05 | 2.7-3.4+ | Bugfix for memory error with xlsx and large csv files. | +|2.06 |2016-12-12 | 2.7-3.4+ | Bugfix for error processing unicode. | +|2.05 |2016-04-26 | 2.7-3.4+ | General improvements and bug fixes for handling unicode and xlsx. Testing is no longer performed on Python 2.6. | |2.04 |2015-05-12 | 2.6-3.4+ | Bugfix for loss of lines when list is long. | |2.03 |2015-04-20 | 2.6-3.4+ | Added -a option to append to existing data. Fixed problem with large files on Windows. | |2.02 |2014-10-13 | 2.6-3.4+ | Fixed the -o option so that cell not in the order are left unchanged. Added ability to add data to empty sheets in xlsx files. Fixed pipes in Windows when using python 2.7. | </pre> </div>Aquileo | Main_Page modified by Larry Jordan2017-07-02T23:24:12.275000Z2017-07-02T23:24:12.275000ZLarry Jordanhttps://sourceforge.net/u/w322/https://sourceforge.neta3876d7cdb89c6681d8068d21cbcb60d276ee696<div class="markdown_content"><pre>--- v63 +++ v64 @@ -99,7 +99,7 @@ | csv2odf Version | Release Date | Requires Python Version | Notes | |:----------------|:-------------|:------------------------|:------| -|2.09 | 2017-07-02 | 2.6-3.5+ | Added option to specify csv file encoding | +|2.09 | 2017-07-01 | 2.6-3.5+ | Added option to specify csv file encoding | |2.08 | 2017-02-14 | 2.6-3.4+ | Bugfixes: unicode regression, Fixed offset of filters when options are inside template. | |2.07 | 2017-02-05 | 2.6-3.4+ | Bugfix for memory error with xlsx and large csv files. | |2.06 |2016-12-12 | 2.6-3.4+ | Bugfix for error processing unicode. | </pre> </div>Aquileo | Main_Page modified by Larry Jordan2017-07-02T23:22:24.281000Z2017-07-02T23:22:24.281000ZLarry Jordanhttps://sourceforge.net/u/w322/https://sourceforge.net612981d9081f778506efdb9443d886352fc89728<div class="markdown_content"><pre>--- v62 +++ v63 @@ -99,6 +99,9 @@ | csv2odf Version | Release Date | Requires Python Version | Notes | |:----------------|:-------------|:------------------------|:------| +|2.09 | 2017-07-02 | 2.6-3.5+ | Added option to specify csv file encoding | +|2.08 | 2017-02-14 | 2.6-3.4+ | Bugfixes: unicode regression, Fixed offset of filters when options are inside template. | +|2.07 | 2017-02-05 | 2.6-3.4+ | Bugfix for memory error with xlsx and large csv files. | |2.06 |2016-12-12 | 2.6-3.4+ | Bugfix for error processing unicode. | |2.05 |2016-04-26 | 2.6-3.4+ | General improvements and bug fixes for handling unicode and xlsx. | |2.04 |2015-05-12 | 2.6-3.4+ | Bugfix for loss of lines when list is long. | </pre> </div>Aquileo | Main_Page modified by Larry Jordan2016-12-13T00:37:02.480000Z2016-12-13T00:37:02.480000ZLarry Jordanhttps://sourceforge.net/u/w322/https://sourceforge.nete2f659de82cacd3b4d99a04376be78fd33ea1cc9<div class="markdown_content"><pre>--- v61 +++ v62 @@ -99,6 +99,7 @@ | csv2odf Version | Release Date | Requires Python Version | Notes | |:----------------|:-------------|:------------------------|:------| +|2.06 |2016-12-12 | 2.6-3.4+ | Bugfix for error processing unicode. | |2.05 |2016-04-26 | 2.6-3.4+ | General improvements and bug fixes for handling unicode and xlsx. | |2.04 |2015-05-12 | 2.6-3.4+ | Bugfix for loss of lines when list is long. | |2.03 |2015-04-20 | 2.6-3.4+ | Added -a option to append to existing data. Fixed problem with large files on Windows. | </pre> </div>Aquileo | Main_Page modified by Larry Jordan2016-08-11T23:24:25.189000Z2016-08-11T23:24:25.189000ZLarry Jordanhttps://sourceforge.net/u/w322/https://sourceforge.netf3472b281a7780373446a03deff63db4cec287b5<div class="markdown_content"><pre></pre> </div>Aquileo | Main_Page modified by Larry Jordan2016-08-11T23:23:27.314000Z2016-08-11T23:23:27.314000ZLarry Jordanhttps://sourceforge.net/u/w322/https://sourceforge.net7ae60e3c2ed0afc34edbd987204e4993e724614e<div class="markdown_content"><pre>--- v59 +++ v60 @@ -99,6 +99,8 @@ | csv2odf Version | Release Date | Requires Python Version | Notes | |:----------------|:-------------|:------------------------|:------| +|2.05 |2016-04-26 | 2.6-3.4+ | General improvements and bug fixes for handling unicode and xlsx. | +|2.04 |2015-05-12 | 2.6-3.4+ | Bugfix for loss of lines when list is long. | |2.03 |2015-04-20 | 2.6-3.4+ | Added -a option to append to existing data. Fixed problem with large files on Windows. | |2.02 |2014-10-13 | 2.6-3.4+ | Fixed the -o option so that cell not in the order are left unchanged. Added ability to add data to empty sheets in xlsx files. Fixed pipes in Windows when using python 2.7. | |2.01 |2014-09-09 | 2.6-3.4+ | Additional decrease in memory. Fixed xml output crash in windows. | </pre> </div>Aquileo | Main_Page modified by Larry Jordan2015-04-20T17:38:25.439000Z2015-04-20T17:38:25.439000ZLarry Jordanhttps://sourceforge.net/u/w322/https://sourceforge.nete40bb4045fcd4ad47773b47b0dade1283e4fe773<div class="markdown_content"><pre>--- v58 +++ v59 @@ -99,6 +99,7 @@ | csv2odf Version | Release Date | Requires Python Version | Notes | |:----------------|:-------------|:------------------------|:------| +|2.03 |2015-04-20 | 2.6-3.4+ | Added -a option to append to existing data. Fixed problem with large files on Windows. | |2.02 |2014-10-13 | 2.6-3.4+ | Fixed the -o option so that cell not in the order are left unchanged. Added ability to add data to empty sheets in xlsx files. Fixed pipes in Windows when using python 2.7. | |2.01 |2014-09-09 | 2.6-3.4+ | Additional decrease in memory. Fixed xml output crash in windows. | |2.00 |2014-07-31 | 2.6-3.4+ | Can now process large data file serially, using less memory. The date tag changed to \[csv2odf-date\]. | </pre> </div>Aquileo | Manual modified by Larry Jordan2014-10-21T22:54:40.261000Z2014-10-21T22:54:40.261000ZLarry Jordanhttps://sourceforge.net/u/w322/https://sourceforge.net248b390305dd6b605d02508c14859ae90a4bd970<div class="markdown_content"><pre>--- v13 +++ v14 @@ -20,7 +20,7 @@ csv2odf is a command line tool that can convert a _comma seperated value_ (csv) file into an ods, odt, html, xlsx, or docx document. csv2odf is useful for creating reports from databases and other data sources that produce csv files. csv2odf can be combined with cron and shell scripts to automatically generate business reports. -The csv data is merged with a *template* file to produce the output file. The template is a document file as produced by OpenOffice.org or Word, or an html file. The template can be a spreadsheet file (ods or xlsx), a document file (odt or docx), or an html file. +The csv data is merged with a *template* file to produce the output file. The template can be a spreadsheet file (ods or xlsx) or a document file (odt or docx), as produced by OpenOffice.org, LibreOffice, or Word. The template can also be an html file. If a csv input file is not specified, input will be taken from standard input (stdin). If an output file is not specified, output will be directed to standard output (stdout). This allows the use of the command in pipes. @@ -39,18 +39,19 @@ ## Options For Processing Csv Data File -c &lt;*char*&gt; : use *char* as delimiter instead of comma --o &lt;*spec*&gt; : 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. +-o &lt;*spec*&gt; : specify column order: 2,1,3 = second csv column is first. Also use to leave the contents of a template column unchanged: 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 &lt;*n*&gt; : start reading at the nth row of the csv file -e &lt;*n*&gt; : end reading at the nth row of the csv file --d &lt;*fmt*&gt; : date format within csv data is specified by *fmt* string, see -D for codes. Identified dates will be translated to the native spreadsheet date code. +-d &lt;*fmt*&gt; : date format within csv data is specified by *fmt* string, see -D for codes. For columns identified as dates, the program will attempt to translate incoming data into the native date coding using the format supplied with the -d option. If the translation fails, the data will be inserted as text. In ods files, the program knows which columns are dates by looking for date formatted cells in the template. In xlsx files you must mark date cells with the text [csv2odf-date] (csv2odf-date inside square brackets). + ## Options For Processing Template File -H : insert the first csv row into the header -\--comment=<text> : replace [csv2odf-comment] within the document with </text><text> +\--comment=&lt;text&gt; : replace [csv2odf-comment] within the document with &lt;text&gt; -S &lt;*n*&gt; : skip the first n rows of the template file, the header will be the next row after those skipped -t &lt;*n*&gt; : specify which tab or table to add data to, default first table -\--div : search for <div> tags instead of (html files only). +\--div : search for &lt;div&gt; tags instead of &lt;table&gt; (html files only). \--template-stdin-ods : The template will be passed to std-in and it's format will be ods \--template-stdin-odt : The template will be passed to std-in and it's format will be odt \--template-stdin-html : The template will be passed to std-in and it's format will be html @@ -64,7 +65,7 @@ -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 test a long line template xml codes +-n : do not merge the data into output, use with -x to extract template xml codes \--input=&lt;*file*&gt; : specify the csv data file location \--template=&lt;*file*&gt; : specify the tempate file location \--output=&lt;*file*&gt; : specify the output file location @@ -73,26 +74,26 @@ ## Date Format Codes -The date format codes are the same ones used by Python&amp;rsquo;s _strftime_ function. +The date format codes are the same ones used by Python's _strftime_ function. -%a Locale&amp;rsquo;s abbreviated weekday name. -%A Locale&amp;rsquo;s full weekday name. -%b Locale&amp;rsquo;s abbreviated month name. -%B Locale&amp;rsquo;s full month name. -%c Locale&amp;rsquo;s appropriate date and time representation. +%a Locale's abbreviated weekday name. +%A Locale's full weekday name. +%b Locale's abbreviated month name. +%B Locale's full month name. +%c Locale's appropriate date and time representation. %d Day of the month as a decimal number [01-31]. %H Hour (24-hour clock) as a decimal number [00-23]. %I Hour (12-hour clock) as a decimal number [01-12]. %j Day of the year as a decimal number [001-366]. %m Month as a decimal number [01-12]. %M Minute as a decimal number [00-59]. -%p Locale&amp;rsquo;s equivalent of either AM or PM. +%p Locale's equivalent of either AM or PM. %S Second as a decimal number [00-61]. %U Week number of the year (Sunday as the first day of the week) as a decimal number [00-53]. All days in a new year preceding the first Sunday are considered to be in week 0 %w Weekday as a decimal number [0(Sunday)-6]. %W Week number of the year (Monday as the first day of the week) as a decimal number [00-53]. All days in a new year preceding the first Monday are considered to be in week 0. -%x Locale&amp;rsquo;s appropriate date representation. -%X Locale&amp;rsquo;s appropriate time representation. +%x Locale's appropriate date representation. +%X Locale's appropriate time representation. %y Year without century as a decimal number [00-99]. %Y Year with century as a decimal number. %Z Time zone name (no characters if no time zone exists). @@ -124,7 +125,7 @@ When the csv file has column names on the first row, -H will cause the column name to be put into the header of the output file. -The csv file has a header but we don&amp;rsquo;t want to use it: +The csv file has a header but we don't want to use it: csv2odf -s 2 data.csv template.ods output.ods <table> </table></div></text></pre></div>Aquileo | Main_Page modified by Larry Jordan2014-10-15T01:02:41.372000Z2014-10-15T01:02:41.372000ZLarry Jordanhttps://sourceforge.net/u/w322/https://sourceforge.net8c73fb59dd65b339bf7e695a85e7c65e734dba26<div class="markdown_content"><pre>--- v57 +++ v58 @@ -99,6 +99,7 @@ | csv2odf Version | Release Date | Requires Python Version | Notes | |:----------------|:-------------|:------------------------|:------| +|2.02 |2014-10-13 | 2.6-3.4+ | Fixed the -o option so that cell not in the order are left unchanged. Added ability to add data to empty sheets in xlsx files. Fixed pipes in Windows when using python 2.7. | |2.01 |2014-09-09 | 2.6-3.4+ | Additional decrease in memory. Fixed xml output crash in windows. | |2.00 |2014-07-31 | 2.6-3.4+ | Can now process large data file serially, using less memory. The date tag changed to \[csv2odf-date\]. | |1.11 |2014-05-20 | 2.6-3.3+ | Bugfix to handle blank cells more cleanly. | </pre> </div>