Saves the range data to the specified file.
[Visual Basic] Function SaveAs( _ ByVal Filename As String, _ ByVal FileFormat As XlFileFormat _ ) As Boolean [C#] bool SaveAs( string Filename, XlFileFormat FileFormat ); [C++] bool SaveAs( String* Filename, XlFileFormat FileFormat ); [JScript] function SaveAs( String Filename, XlFileFormat FileFormat ): bool;
Returns true if it succeeded, false otherwise.
This example saves range A3:F10 into CSV file.
[C#]
book.Worksheets[1].Range["A3:F10"].SaveAs("range.csv", XlFileFormat.xlCSV);
[Visual Basic]
book.Worksheets(1).Range("A3:F10").SaveAs("range.csv", XlFileFormat.xlCSV)
[C++]
book->Worksheets->Item[1]->Range->Item[S"A3:F10"]->SaveAs(S"range.csv", XlFileFormat::xlCSV);
IRange Interface | NativeExcel Namespace | IRange.SaveAs Overload List | Factory Class | IRange.SaveAs(System.IO.Stream, NativeExcel.XlFileFormat) method | IWorksheet.SaveAs(System.String, NativeExcel.XlFileFormat) method | IWorkbook.SaveAs(System.String, NativeExcel.XlFileFormat) method