
Contents |
Comma Delimited (CSV)
Import csv file
impCSV fname:="c:\test.csv"
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| File Name | fname |
Input string | |
Specify the filename of the file to be imported. |
| File Info | trfiles |
Input TreeNode | |
This is used to show the file size in the dialog. The information is detected by Origin automatically. |
| Import Options | options |
Input TreeNode | |
This is mainly used in the dialog, for tweaking the import options. Please see the Descriptions section for details. |
| Output | orng |
Output Range | |
Use this to specify the output range. See the syntax here. |
| Header Info | trheader |
Output TreeNode | |
This is for outputting the header information. It is hidden from the GUI. Users are not advised to use this variable from Labtalk.
|
| Repeat import | reimp |
Input int | |
This is used for the reimport feature. It is hidden from the GUI. Users are not advised to use this variable from Labtalk. |
CSV (comma-separated values) is one kind of delimited file, which as the name suggests, uses commas to separate values. This X-Function helps you to import this kind of file.
Details on Some Dialog Options
1. The following example imports a CSV file into a new book and renames the book with the filename:
2. The following script command imports a CSV file (c:\test.csv) without opening the dialog: