Description
This tool exports tables to a delimited text file format (by default a comma delimited text file). If the output file already exists, the file will not be overwritten and an error is generated.
The 'transpose' option rotates the data (rows become columns, and columns become rows). If you have a large number of rows in the input table you will not be able to view the table in a program like Excel because of the limit to the number of columns that can be displayed, but you could still use the transposed table in a program that was designed to accept a large number of columns.
The delimiting character can be specified. See the 'delimiter' command for instructions on how to change the delimiting character on all tabular text output.
Syntax
export.csv(in, out, [transpose]);
| in | the input table data source | |
| out | the output delimited text file | |
| [transpose] | (TRUE/FALSE) if TRUE transposes the table (default=FALSE) |
Example
export.csv(in="C:\data\locs.shp", out="C:\data\locs.csv");
export.csv(in="C:\data\locs.shp", out="C:\data\locs.csv", transpose=TRUE);