SaveWorkbookAsCsv

Save the workbook to a CSV file.

The following overloads are available:

Overload Name Description
Desktop Save to the desktop of the current user. Specify the file name.
General Specify the full path.
MyDocuments Save to the My Documents folder of the current user. Specify the file name.

Desktop

Save to the desktop of the current user. Specify the file name.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
This option is limited one of the following values: <blank> SheetName SheetNumber AllSheets Workbook
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE
Filename Specify the name of the file.
IncrementFilename Whether to add a subscript to the filename if the specified file already exists. If not true, an existing file with the same name will be overwritten.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE
UseDialog Whether to show the Save File dialog to allow the user to select the folder and filename.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE
Password The password assigned to the saved workbook.
PreserveLeadingSingleQuotes Whether to preserve the leading single quote used to indicate text in cells in the CSV output. If true, the resulting CSV file will preserve leading single quotes.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE

General

Specify the full path.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
This option is limited one of the following values: <blank> SheetName SheetNumber AllSheets Workbook
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE
Filename Specify the name of the file.
Folder Specify the folder to save the file to.
IncrementFilename Whether to add a subscript to the filename if the specified file already exists. If not true, an existing file with the same name will be overwritten.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE
UseDialog Whether to show the Save File dialog to allow the user to select the folder and filename.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE
Password The password assigned to the saved workbook.
PreserveLeadingSingleQuotes Whether to preserve the leading single quote used to indicate text in cells in the CSV output. If true, the resulting CSV file will preserve leading single quotes.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE

MyDocuments

Save to the My Documents folder of the current user. Specify the file name.

Argument Description
SpecifySheetBy Select how to specify which worksheet to select while the method is being executed.
This option is limited one of the following values: <blank> SheetName SheetNumber AllSheets Workbook
SheetSpec Specify the sheet-name or sheet-number, depending on SpecifySheetBy.
Address The address of a range to select for the execution of the method.
CellByCell Whether to execute the method on a cell-by-cell basis, or on the range specified by the address.
ReverseOrder Whether to loop through the rows and columns from highest to lowest. Only applies when CellByCell is true.
MethodCondition If the result of method-condition expression resolves to FALSE, then the method is not executed.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE
CellCondition If the result of the condition expression resolves to FALSE, then the current cell is skipped.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE
Filename Specify the name of the file.
IncrementFilename Whether to add a subscript to the filename if the specified file already exists. If not true, an existing file with the same name will be overwritten.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE
UseDialog Whether to show the Save File dialog to allow the user to select the folder and filename.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE
Password The password assigned to the saved workbook.
PreserveLeadingSingleQuotes Whether to preserve the leading single quote used to indicate text in cells in the CSV output. If true, the resulting CSV file will preserve leading single quotes.
Specify one of the following values or an arbitrary value: <blank> FALSE TRUE