Spread Silverlight Documentation
ExcelOpenFlags Enumeration
Example Example 


Specifies what part of the Excel-compatible file to load into the spreadsheet.
Syntax
'Declaration
 
<System.FlagsAttribute()>
Public Enum ExcelOpenFlags 
   Inherits System.Enum
'Usage
 
Dim instance As ExcelOpenFlags
[System.Flags()]
public enum ExcelOpenFlags : System.Enum 
Members
MemberDescription
ColumnHeadersLoads column headers from frozen rows in the Excel-compatible file into the spreadsheet.
DataAndFormulasOnlyLoads formulas from the Excel-compatible file into the spreadsheet.
DataOnlyLoads only the data from the Excel-compatible file into the spreadsheet.
DoNotRecalculateAfterLoadAvoids recalculation after loading the Excel-compatible file (by not setting the SheetView.AutoCalculation property to true and not calling SheetView.Recalculate()).
NoFlagsSetOpens the spreadsheet from the Excel-compatible file with no special options.
RowAndColumnHeadersLoads row headers from frozen columns and column headers from frozen rows.
RowHeadersLoads row headers from frozen columns in the Excel-compatible file into the spreadsheet.
Example
This example uses the ExcelOpenFlags 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.OpenExcel(s);
//gcSpreadSheet1.OpenExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelOpenFlags.RowAndColumnHeaders);
//gcSpreadSheet1.OpenExcel(s, "12Test9");
//gcSpreadSheet1.OpenExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelOpenFlags.RowAndColumnHeaders, "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.OpenExcel(s)
'GcSpreadSheet1.OpenExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelOpenFlags.RowAndColumnHeaders)
'GcSpreadSheet1.OpenExcel(s, "12Test9")
'GcSpreadSheet1.OpenExcel(s, GrapeCity.Windows.SpreadSheet.Data.ExcelOpenFlags.RowAndColumnHeaders, "12Test9")
s.Close()
GcSpreadSheet1.Invalidate()
Inheritance Hierarchy

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

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.