CsvFileOutputRecordStream.Open
- Aktualisiert2025-07-21
- 1 Minute(n) Lesezeit
CsvFileOutputRecordStream.Open
Syntax
CsvFileOutputRecordStream.Open( absolutePath, openMode)
Purpose
Open the file specified by the absolutePath argument, associating it with this CsvFileOutputRecordStream .
Remarks
You will not normally need to call this method, as Engine.NewCsvFileOutputRecordStream returns a stream already associated with an open file. When a CsvFileOutputRecordStream is no longer needed, it should be closed by calling CsvFileOutputRecordStream.Close . If it is not closed already, the stream will close automatically when the last reference to it is removed.
Parameters
absolutePath As String
[In] Specifies the absolute path to the CSV file.
openMode As Long
[In] Specifies how to open the CSV file. Supported options include:
- FileOpenMode_NoOptions - Create the file if it does not exist. Fail with a run-time error if the file exists.
- FileOpenMode_Truncate - If the file exists, overwrite it deleting the previous contents. Create a new file if it does not exist.
- FileOpenMode_Append - If the file exists, append to the end of it, preserving the existing contents. Create a new file if it does not exist.
- FileOpenMode_Uniquify - Create a new file if it does not exist. If a file with the specified path exists, attempt to make the file name unique by appending "_" (underscore) plus a numeric suffix to the file name. For example, if "AlreadyExists.csv" already exists, "AlreadyExists_2.csv" is tried, then "AlreadyExists_3.csv", etc. until a unique name has been found. If a unique name is not found after 10000 attempts, the method fails and throws a runtime error.