Worksheet.SaveAs Method (String, Object, Object, Object, Object, Object, Object, Object, Object, Object)

 

Saves changes to the worksheet in a different file.

Namespace:   Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)

void SaveAs(
	string Filename,
	object FileFormat,
	object Password,
	object WriteResPassword,
	object ReadOnlyRecommended,
	object CreateBackup,
	object AddToMru,
	object TextCodepage,
	object TextVisualLayout,
	object Local
)

Parameters

Filename
Type: System.String

The name of the file to be saved. You can include a full path; if you do not, Microsoft Office Excel saves the file in the current folder.

FileFormat
Type: System.Object

The file format to use when you save the file. For a list of valid choices, see the FileFormat property. For an existing file, the default format is the last file format specified; for a new file, the default is the format of the version of Excel being used.

Password
Type: System.Object

A case-sensitive string (no more than 15 characters) that indicates the protection password to be given to the file.

WriteResPassword
Type: System.Object

The write-reservation password for this file. If a file is saved with the password and the password is not supplied when the file is opened, the file is opened as read-only.

ReadOnlyRecommended
Type: System.Object

true to display a message when the file is opened, recommending that the file be opened as read-only.

CreateBackup
Type: System.Object

true to create a backup file.

AddToMru
Type: System.Object

true to add this workbook to the list of recently used files. The default value is false.

TextCodepage
Type: System.Object

Not used in U.S. English Excel.

TextVisualLayout
Type: System.Object

Not used in U.S. English Excel.

Local
Type: System.Object

true saves files against the language of Excel (including control panel settings); false (default) saves files against the language of Visual Basic for Applications (VBA).

For information on optional parameters, see Optional Parameters in Office Solutions.

Return to top
Show: