Skip to content

Write to CSV

Write data to a CSV file.

Note

  1. When the specified CSV file does not exist or is empty, the header will be automatically output in the first row.
  2. To prevent parsing errors in Excel or WPS caused by special characters in string data, string data will be wrapped in double quotes when output.
  3. When the set timestamp format conforms to a certain standard, Excel and WPS will automatically parse and display it as a date format, and the displayed content may differ from the actual data.
  4. The encoding of the output data is UTF-8. Since Excel parses strings in CSV files using ANSI encoding (GB2312 encoding in simplified Chinese systems), Chinese characters may display as garbled characters in Excel.

Parameter Introduction

Calculation Parameters

ParameterRangeDefault ValueDescriptionDiagram
First Column ContentNone / TimestampTimestampUsed to set the automatically generated content of the first column
Time Format-%Y_%m_%d %H:%M:%S.%iWhen First Column Content is Timestamp, set the timestamp format
Decimal Places0-63Set the number of decimal places when outputting floating-point numbers
Boolean Escape.True-OKSet the text output when the boolean value is true
Boolean Escape.False-NGSet the text output when the boolean value is false
MethodFixed File / Continuous FilesFixed FileFixed File: Save to the specified file
Continuous: Save to the specified folder, and the file name is automatically generated according to the configuration.
File--Specify the file path
Directory--Specify the folder path
Prefix-DataPrefix of the automatically generated file name
Stamp-%Y_%m_%dSet the format of the stamp
Auto-Classification.Enabletrue/falsefalseAutomatically generate and save to subfolders according to the configuration
Auto-Classification.MethodBy Date / CustomBy DateSelect the classification method
Auto-Classification.Date Format-%Y_%m_%dSet the date format; leaving it blank is equivalent to %Y_%m_%d
Auto-Classification.Custom-%Y_%m_%d/%H_%M_%SCustom folder structure; time can be represented using placeholders

Table Design

ParameterRangeDefault ValueDescriptionDiagram
Serial Number----
Name-column0The header name of the output column
Type--Display the actual type of the parameter bound to Value
Value--The value output in this column; only allows binding values of type bool/int/float/string

Troubleshooting

No.Error MessageCorresponding ParameterSolution
1The parameter "xxx" cannot be emptyParameter NameEnter the value for the "xxx" parameter.
2The folder "xxx" does not exist or is inaccessibleDirectoryEnsure the specified folder exists and has read/write permissions.
3The file "xxx" cannot be created or written toFileEnsure the specified file has read/write permissions, and the folder where it is located exists and has read/write permissions.
4Failed to write data to the file "xxx".File / DirectoryUnknown exception; it may be that the file is occupied by other software.

AI-Vision, Making 3D Measurement Easier