Revision [1811]

Last edited on 2012-01-29 06:32:14 by DavidLee
Additions:
The input CSV file is read using the text encoding [[SerializationOptions serialization options]].
Deletions:
||-encoding encoding ||read csv file in encoding (default "cp1252")||


Revision [1771]

Edited on 2011-07-01 06:22:02 by DavidLee
Additions:
||-trim||Trim the output by ignoring any data after the last column specified in -colnames or -header||
||-max #||Combine the data in the last field by ignoring any more delimiters after the # of fields is specifed, or if # is <=0 then use the number of colums||


Revision [1496]

Edited on 2010-08-11 07:40:59 by DavidLee
Additions:
If both -colnames and -header are specified then -colnames takes precedence but the header is still read (and ignored).
Deletions:
If both -colnames and -header are specified then -colnames takes precedence but the header is still read.


Revision [985]

Edited on 2009-11-25 09:50:11 by DavidLee
Additions:
====Examples====
Deletions:
====Example====


Revision [913]

Edited on 2009-11-24 17:37:12 by DavidLee
Additions:
||-root rootname||Use "rootname" as the root element name, default "root"||
||-row rowname|| use "rowname" as each row's element name, default "row"||
||-col colname|| use "colname" as each column's element name (or for attribute normal format, the attribute prefix)||
||-colnames names|| Use a sequence or , separated list of strings to specify the column names||
||-delim delimchar|| deliminate columns with delimchar, default ","||
||-tab ||Use tab char as delimitor. Synonymous for -delim <[ "&#009;" ]>||
||-quote quotechar|| quote with quote character, default "||
||-encoding encoding ||read csv file in encoding (default "cp1252")||
||-header || read 1 row from the csv file and use as column names (element or attribute)||
||-attr || Output in attribute normal format (each column is an attribute), default row normal format||
||-skip lines ||Skip # lines before reading header or data ||
||csvfile || Name of the csv file to convert, otherwise stdin. Default "-" (stdin)||
Deletions:
-root rootname use "rootname" as the root element name, default "root"
-row rowname use "rowname" as each row's element name, default "row"
-col colname use "colname" as each column's element name (or for attribute normal format, the attribute prefix)
-colnames names Use a sequence or , separated list of strings to specify the column names
-delim delimchar deliminate columns with delimchar, default ","
-tab Use tab char as delimitor. Synonymous for -delim <[ "&#009;" ]>
-quote quotechar quote with quote character, default "
-encoding encoding read csv file in encoding (default "cp1252")
-header read 1 row from the csv file and use as column names (element or attribute)
-attr Output in attribute normal format (each column is an attribute), default row normal format
-skip lines Skip # lines before reading header or data
csvfile Name of the csv file to convert, otherwise stdin. Default "-" (stdin)


Revision [910]

Edited on 2009-11-24 17:33:54 by DavidLee
Additions:
csv2xml [ [[SerializationOptions serialization options]] ] [options] [csvfile]
Supports the standard [ [[SerializationOptions serialization options]] ]
Example
echo foo,bar | csv2xml
Result
Deletions:
csv2xml [options] [csvfile]
$ echo foo,bar | csv2xml


Revision [885]

Edited on 2009-11-24 10:51:38 by DavidLee
Additions:
-skip lines Skip # lines before reading header or data
If both -colnames and -header are specified then -colnames takes precedence but the header is still read.


Revision [869]

Edited on 2009-11-22 09:28:49 by DavidLee
Additions:
-tab Use tab char as delimitor. Synonymous for -delim <[ "&#009;" ]>


Revision [867]

Edited on 2009-11-22 07:58:42 by DavidLee
Additions:
[[Commands]]


Revision [866]

Edited on 2009-11-22 07:58:28 by DavidLee
Additions:
-colnames names Use a sequence or , separated list of strings to specify the column names
If -colnames is specified, its argument is taken to be either a sequence of strings, or a single string which is "," seperated which specifieds the column names to be used.
if -header is specified then the first row of the CSV file is read and the values used as column names.
Deletions:
-cols colseq Use a sequence of strings to specify the column names


Revision [857]

Edited on 2009-11-22 05:09:43 by DavidLee
Additions:
-root rootname use "rootname" as the root element name, default "root"
-row rowname use "rowname" as each row's element name, default "row"
-col colname use "colname" as each column's element name (or for attribute normal format, the attribute prefix)
-cols colseq Use a sequence of strings to specify the column names
-delim delimchar deliminate columns with delimchar, default ","
-quote quotechar quote with quote character, default "
Deletions:
-root rootname use "rootname" as the root element name, default "root"
-row rowname use "rowname" as each row's element name, default "row"
-col colname use "colname" as each column's element name (or for attribute normal format, the attribute prefix)
-delim delimchar deliminate columns with delimchar, default ","
-quote quotechar quote with quote character, default "


Revision [633]

Edited on 2009-06-20 10:16:57 by DavidLee
Additions:
csv2xml [options] [csvfile]
====Options====
-quote quotechar quote with quote character, default "
Deletions:
csv2xml [-root rootname] [-row rowname] [-col colname] [-delim delimchar] [-encoding encoding] [-header] [-attr] [csvfile]
====Description====


Revision [313]

The oldest known version of this page was created on 2008-12-09 13:29:30 by DavidLee
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki