Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

ChartSheetBase.SaveAs Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Saves changes to the Microsoft.Office.Tools.Excel.ChartSheetBase in a different file.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
public void SaveAs(
	string filename,
	Object fileFormat,
	Object password,
	Object writeResPassword,
	Object readOnlyRecommended,
	Object createBackup,
	Object addToMru,
	Object textCodepage,
	Object textVisualLayout,
	Object local


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.

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.

Type: System.Object

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

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.

Type: System.Object

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

Type: System.Object

true to create a backup file.

Type: System.Object

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

Type: System.Object

Not used in U.S. English Excel.

Type: System.Object

Not used in U.S. English Excel.

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 (which is typically US English unless the VBA project where Workbooks.Open is run from is an old internationalized XL5/95 VBA project).

Optional Parameters

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

The following code example uses the SaveAs method to save an unprotected copy of the current Microsoft.Office.Tools.Excel.ChartSheetBase.

private void SaveCopy()
    Globals.Sheet1.Range["A1", "A5"].Value2 = 22;
    Globals.Sheet1.Range["B1", "B5"].Value2 = 55;

    this.SetSourceData(Globals.Sheet1.Range["A1", "B5"],
    this.ChartType = Excel.XlChartType.xl3DColumn;

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.