Spread Silverlight Documentation
ExcelSaveFlags Enumeration
Example Example 


Specifies what part of the spreadsheet to export to an Excel-compatible file.
Syntax
'Declaration
 
<System.FlagsAttribute()>
Public Enum ExcelSaveFlags 
   Inherits System.Enum
'Usage
 
Dim instance As ExcelSaveFlags
[System.Flags()]
public enum ExcelSaveFlags : System.Enum 
Members
MemberDescription
AutoRowHeightThe default row height is not saved. Excel automatically determines row heights based on the largest font that is set in each row.
DataOnlySaves only the data to the Excel-compatible file.
NoFlagsSetSaves the spreadsheet to the Excel-compatible file with no special options.
NoFormulasSaves the displayed data, but not the formulas, to the Excel-compatible file.
SaveAsFilteredSaves the filtered row results to the Excel-compatible file.
SaveAsViewedSaves the spreadsheet as viewed to the Excel-compatible file.
SaveBothCustomRowAndColumnHeadersSaves both the custom row headers and the custom column headers to the Excel-compatible file.
SaveCustomColumnHeadersSaves the custom column headers to the Excel-compatible file.
SaveCustomRowHeadersSaves the custom row headers to the Excel-compatible file.
Example
This example uses the ExcelSaveFlags enumeration.
string f;
f = "c:\\zipfile\\test1.xlsx";
// Open an existing file named test1.xlsx
System.IO.FileStream s = new System.IO.FileStream(f, System.IO.FileMode.Open, System.IO.FileAccess.ReadWrite);
gcSpreadSheet1.SaveExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelFileFormat.XLSX);
//gcSpreadSheet1.SaveExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelFileFormat.XLSX, "12Test9");
//gcSpreadSheet1.SaveExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelFileFormat.XLSX, GrapeCity.Windows.SpreadSheet.Data.ExcelSaveFlags.DataOnly);
//gcSpreadSheet1.SaveExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelFileFormat.XLSX, GrapeCity.Windows.SpreadSheet.Data.ExcelSaveFlags.DataOnly, "12Test9");
s.Close();
gcSpreadSheet1.Invalidate();
Dim f As String
f = "c:\zipfile\test1.xlsx"
' Open an existing file named test1.xlsx
Dim s As New System.IO.FileStream(f, System.IO.FileMode.Open, System.IO.FileAccess.ReadWrite)
GcSpreadSheet1.SaveExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelFileFormat.XLSX)
'GcSpreadSheet1.SaveExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelFileFormat.XLSX, "12Test9")
'GcSpreadSheet1.SaveExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelFileFormat.XLSX, GrapeCity.Windows.SpreadSheet.Data.ExcelSaveFlags.DataOnly)
'GcSpreadSheet1.SaveExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelFileFormat.XLSX, GrapeCity.Windows.SpreadSheet.Data.ExcelSaveFlags.DataOnly, "12Test9")
s.Close()
GcSpreadSheet1.Invalidate()
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         GrapeCity.Windows.SpreadSheet.Data.ExcelSaveFlags

Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

GrapeCity.Windows.SpreadSheet.Data Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.