cbLogConvertFile()
Converts a binary log file to a comma-separated values (.CSV) text file or another text file format that you specify.
Function Prototype
C/C++
int cbLogConvertFile(char* srcFile, char* destFile, int startSample,
int count, int delimiter)
Visual Basic
Function cbLogConvertFile(ByVal Filename$, ByVal DestFilename$, ByVal StartSample&, ByVal SampleCount&, ByVal Delimiter&) As Long
Arguments
srcFile
The name and path of the binary file to read.
destFile
The name and destination path of the converted file. Use the file extension of the file type that you want to create.
startSample
The index number of the first sample to read.
count
The number of samples to read.
delimiter
Specifies the character used between fields in the converted
file. Set to one of the Delimiter constants. Choices are:
0 = DELIMITER_COMMA
1 = DELIMITER_SEMICOLON
2 = DELIMITER_SPACE
3 = DELIMITER_TAB
Returns
Notes
- Timestamp data is stored according to the timeZone and timeFormat arguments. Refer to
cbLogSetPreferences().
- Timestamps in the converted file may be in either 12-hour or 24-hour format based on the setting of the timeFormat argument. Timestamps can optionally be converted to local time based on the setting of the timeZone argument.
- AI temperature data is returned according to the Units preference. Refer to cbLogSetPreferences().
- The Units preference is only applied to the AI data if the data was logged as temperature data. Refer to cbLogGetAIInfo(). This value is ignored if the AI data was logged as raw data.
- The units preference is always applied to CJC data, since it is always logged as temperature data.
- If the destFile argument ends with a .CSV extension, the delimiter argument must be set to DELIMITER_COMMA. Otherwise, an INVALIDDELIMITER error is returned.
- You can open a comma-separated values text file (.CSV) directly in Microsoft Excel. Text files with extensions other than .CSV can only be imported into Excel.