ActiveX
To save a portion of the sheet to a delimited file
Use the ExportRangeToTextFile method to export an ANSI text file or the ExportRangeToTextFileU method to export a Unicode text file, and set the parameters as follows:
- If you have multiple sheets, specify the Sheet first
-
Set the Col, Row, Col2, and Row2 parameters to specify the cell, row, column, or block of cells.
Using Column and Row Properties explains valid values for the Col, Row, Col2, and Row2 parameters.
-
Set the FileName parameter to a valid path and file name.
If you do not specify an extension, Spread will add .TXT.
-
Set the CellDelim, ColDelim, and RowDelim parameters to the text to use as the cell, column, and row delimiters, respectively.
For more information about working with delimiters in text files, see the ExportRangeToTextFile method or the ExportRangeToTextFileU method.
- Set the Flags parameter to specify whether to overwrite or append formatted or unformatted data, and whether to export column headers, row headers, or both.
-
Set the LogFile parameter to the path and file name of the log file you want the control to create.
If you do not want to generate a log file, set the LogFile parameter to "".