C# Class NPOI.XSSF.UserModel.XSSFWorkbook

Inheritance: POIXMLDocument, IWorkbook
Mostrar archivo Open project: tonyqus/npoi Class Usage Examples

Public Properties

Property Type Description
DEFAULT_CHARACTER_WIDTH float
PICTURE_TYPE_BMP int
PICTURE_TYPE_DIB int
PICTURE_TYPE_EMF int
PICTURE_TYPE_EPS int
PICTURE_TYPE_GIF int
PICTURE_TYPE_JPEG int
PICTURE_TYPE_PICT int
PICTURE_TYPE_PNG int
PICTURE_TYPE_TIFF int
PICTURE_TYPE_WMF int
PICTURE_TYPE_WPG int

Public Methods

Method Description
Add ( ISheet item ) : void
AddPicture ( Stream picStream, int format ) : int
AddPicture ( byte pictureData, PictureType format ) : int
AddPicture ( byte pictureData, int format ) : int
AddToolPack ( NPOI.SS.Formula.Udf.UDFFinder toopack ) : void
Clear ( ) : void
CloneSheet ( int sheetNum ) : ISheet
Contains ( ISheet item ) : bool
CopyTo ( ISheet array, int arrayIndex ) : void
CreateCellStyle ( ) : ICellStyle

Create a new XSSFCellStyle and add it to the workbook's style table

CreateDataFormat ( ) : IDataFormat

Returns the instance of XSSFDataFormat for this workbook.

CreateFont ( ) : IFont

Create a new Font and add it to the workbook's font table

CreateName ( ) : IName
CreateSheet ( ) : ISheet
CreateSheet ( String sheetname ) : ISheet
FindFont ( short boldWeight, short color, short fontHeight, String name, bool italic, bool strikeout, FontSuperScript typeOffset, FontUnderlineType underline ) : IFont
GetAllEmbedds ( ) : List
GetAllPictures ( ) : IList
GetBuiltInName ( String builtInCode, int sheetNumber ) : NPOI.XSSF.UserModel.XSSFName
GetCTWorkbook ( ) : NPOI.OpenXmlFormats.Spreadsheet.CT_Workbook
GetCalculationChain ( ) : NPOI.XSSF.Model.CalculationChain
GetCellStyleAt ( short idx ) : ICellStyle
GetCellStyleAt ( int idx ) : NPOI.XSSF.UserModel.XSSFCellStyle
GetCreationHelper ( ) : ICreationHelper
GetCustomXMLMappings ( ) : List
GetEnumerator ( ) : IEnumerator
GetFontAt ( short idx ) : IFont
GetForceFormulaRecalculation ( ) : bool
GetMapInfo ( ) : NPOI.XSSF.Model.MapInfo
GetName ( String name ) : IName
GetNameAt ( int nameIndex ) : IName
GetNameIndex ( String name ) : int
GetPrintArea ( int sheetIndex ) : String
GetSharedStringSource ( ) : NPOI.XSSF.Model.SharedStringsTable
GetSheet ( String name ) : ISheet
GetSheetAt ( int index ) : ISheet
GetSheetIndex ( ISheet sheet ) : int
GetSheetIndex ( String name ) : int

Returns the index of the sheet by his name (case insensitive match)

GetSheetName ( int sheetIx ) : String
GetStylesSource ( ) : NPOI.XSSF.Model.StylesTable
GetTheme ( ) : NPOI.XSSF.Model.ThemesTable
IndexOf ( ISheet item ) : int
Insert ( int index, ISheet item ) : void
IsMacroEnabled ( ) : bool
IsRevisionLocked ( ) : bool
IsSheetHidden ( int sheetIx ) : bool
IsSheetVeryHidden ( int sheetIx ) : bool
IsStructureLocked ( ) : bool
IsWindowsLocked ( ) : bool
LinkExternalWorkbook ( String name, IWorkbook workbook ) : int
LockRevision ( ) : void
LockStructure ( ) : void
LockWindows ( ) : void
Remove ( ISheet item ) : bool
RemoveAt ( int index ) : void
RemoveName ( String name ) : void
RemoveName ( NPOI.XSSF.UserModel.XSSFName name ) : void
RemoveName ( int nameIndex ) : void
RemovePrintArea ( int sheetIndex ) : void
RemoveSheetAt ( int index ) : void
SetActiveSheet ( int sheetIndex ) : void
SetForceFormulaRecalculation ( bool value ) : void
SetPrintArea ( int sheetIndex, String reference ) : void
SetPrintArea ( int sheetIndex, int startColumn, int endColumn, int startRow, int endRow ) : void
SetSelectedTab ( int index ) : void
SetSheetHidden ( int sheetIx, SheetState state ) : void
SetSheetHidden ( int sheetIx, bool hidden ) : void
SetSheetHidden ( int sheetIx, int hidden ) : void

Hide or unhide a sheet.

SetSheetName ( int sheetIndex, String sheetname ) : void
SetSheetOrder ( String sheetname, int pos ) : void
UnlockRevision ( ) : void
UnlockStructure ( ) : void
UnlockWindows ( ) : void
XSSFWorkbook ( ) : System.Text.RegularExpressions
XSSFWorkbook ( FileInfo file ) : System.Text.RegularExpressions
XSSFWorkbook ( NPOI.OpenXml4Net.OPC.OPCPackage pkg ) : System.Text.RegularExpressions
XSSFWorkbook ( Stream is1 ) : System.Text.RegularExpressions
XSSFWorkbook ( String path ) : System.Text.RegularExpressions
this ( int index ) : ISheet

Protected Methods

Method Description
AddPivotCache ( String rId ) : NPOI.OpenXmlFormats.Spreadsheet.CT_PivotCache
BeforeDocumentRead ( ) : void
Commit ( ) : void
CreateDialogsheet ( String sheetname, NPOI.OpenXmlFormats.Spreadsheet.CT_Dialogsheet dialogsheet ) : NPOI.XSSF.UserModel.XSSFDialogsheet
newPackage ( ) : NPOI.OpenXml4Net.OPC.OPCPackage

Private Methods

Method Description
AddSheet ( String sheetname ) : NPOI.OpenXmlFormats.Spreadsheet.CT_Sheet
ContainsSheet ( String name, int excludeSheetIdx ) : bool
CreateBuiltInName ( String builtInName, int sheetNumber ) : NPOI.XSSF.UserModel.XSSFName
CreateProtectionFieldIfNotPresent ( ) : void
GetReferenceBuiltInRecord ( String sheetName, int startC, int endC, int startR, int endR ) : String
GetReferencePrintArea ( String sheetName, int startC, int endC, int startR, int endR ) : String
GetUDFFinder ( ) : NPOI.SS.Formula.Udf.UDFFinder
IsDate1904 ( ) : bool
OnDeleteFormula ( NPOI.XSSF.UserModel.XSSFCell cell ) : void
OnDocumentRead ( ) : void
OnSheetDelete ( int index ) : void
OnWorkbookCreate ( ) : void
ReprocessNamedRanges ( ) : void
SaveCalculationChain ( ) : void
SaveNamedRanges ( ) : void
SetRepeatingRowsAndColumns ( int sheetIndex, int startColumn, int endColumn, int startRow, int endRow ) : void
ValidateSheetIndex ( int index ) : void
WorkbookProtectionPresent ( ) : bool

Method Details

Add() public method

public Add ( ISheet item ) : void
item ISheet
return void

AddPicture() public method

public AddPicture ( Stream picStream, int format ) : int
picStream Stream
format int
return int

AddPicture() public method

public AddPicture ( byte pictureData, PictureType format ) : int
pictureData byte
format PictureType
return int

AddPicture() public method

public AddPicture ( byte pictureData, int format ) : int
pictureData byte
format int
return int

AddPivotCache() protected method

protected AddPivotCache ( String rId ) : NPOI.OpenXmlFormats.Spreadsheet.CT_PivotCache
rId String
return NPOI.OpenXmlFormats.Spreadsheet.CT_PivotCache

AddToolPack() public method

public AddToolPack ( NPOI.SS.Formula.Udf.UDFFinder toopack ) : void
toopack NPOI.SS.Formula.Udf.UDFFinder
return void

BeforeDocumentRead() protected method

protected BeforeDocumentRead ( ) : void
return void

Clear() public method

public Clear ( ) : void
return void

CloneSheet() public method

public CloneSheet ( int sheetNum ) : ISheet
sheetNum int
return ISheet

Commit() protected method

protected Commit ( ) : void
return void

Contains() public method

public Contains ( ISheet item ) : bool
item ISheet
return bool

CopyTo() public method

public CopyTo ( ISheet array, int arrayIndex ) : void
array ISheet
arrayIndex int
return void

CreateCellStyle() public method

Create a new XSSFCellStyle and add it to the workbook's style table
public CreateCellStyle ( ) : ICellStyle
return ICellStyle

CreateDataFormat() public method

Returns the instance of XSSFDataFormat for this workbook.
public CreateDataFormat ( ) : IDataFormat
return IDataFormat

CreateDialogsheet() protected method

protected CreateDialogsheet ( String sheetname, NPOI.OpenXmlFormats.Spreadsheet.CT_Dialogsheet dialogsheet ) : NPOI.XSSF.UserModel.XSSFDialogsheet
sheetname String
dialogsheet NPOI.OpenXmlFormats.Spreadsheet.CT_Dialogsheet
return NPOI.XSSF.UserModel.XSSFDialogsheet

CreateFont() public method

Create a new Font and add it to the workbook's font table
public CreateFont ( ) : IFont
return IFont

CreateName() public method

public CreateName ( ) : IName
return IName

CreateSheet() public method

public CreateSheet ( ) : ISheet
return ISheet

CreateSheet() public method

public CreateSheet ( String sheetname ) : ISheet
sheetname String
return ISheet

FindFont() public method

public FindFont ( short boldWeight, short color, short fontHeight, String name, bool italic, bool strikeout, FontSuperScript typeOffset, FontUnderlineType underline ) : IFont
boldWeight short
color short
fontHeight short
name String
italic bool
strikeout bool
typeOffset FontSuperScript
underline FontUnderlineType
return IFont

GetAllEmbedds() public method

public GetAllEmbedds ( ) : List
return List

GetAllPictures() public method

public GetAllPictures ( ) : IList
return IList

GetBuiltInName() public method

public GetBuiltInName ( String builtInCode, int sheetNumber ) : NPOI.XSSF.UserModel.XSSFName
builtInCode String
sheetNumber int
return NPOI.XSSF.UserModel.XSSFName

GetCTWorkbook() public method

public GetCTWorkbook ( ) : NPOI.OpenXmlFormats.Spreadsheet.CT_Workbook
return NPOI.OpenXmlFormats.Spreadsheet.CT_Workbook

GetCalculationChain() public method

public GetCalculationChain ( ) : NPOI.XSSF.Model.CalculationChain
return NPOI.XSSF.Model.CalculationChain

GetCellStyleAt() public method

public GetCellStyleAt ( short idx ) : ICellStyle
idx short
return ICellStyle

GetCellStyleAt() public method

public GetCellStyleAt ( int idx ) : NPOI.XSSF.UserModel.XSSFCellStyle
idx int
return NPOI.XSSF.UserModel.XSSFCellStyle

GetCreationHelper() public method

public GetCreationHelper ( ) : ICreationHelper
return ICreationHelper

GetCustomXMLMappings() public method

public GetCustomXMLMappings ( ) : List
return List

GetEnumerator() public method

public GetEnumerator ( ) : IEnumerator
return IEnumerator

GetFontAt() public method

public GetFontAt ( short idx ) : IFont
idx short
return IFont

GetForceFormulaRecalculation() public method

public GetForceFormulaRecalculation ( ) : bool
return bool

GetMapInfo() public method

public GetMapInfo ( ) : NPOI.XSSF.Model.MapInfo
return NPOI.XSSF.Model.MapInfo

GetName() public method

public GetName ( String name ) : IName
name String
return IName

GetNameAt() public method

public GetNameAt ( int nameIndex ) : IName
nameIndex int
return IName

GetNameIndex() public method

public GetNameIndex ( String name ) : int
name String
return int

GetPrintArea() public method

public GetPrintArea ( int sheetIndex ) : String
sheetIndex int
return String

GetSharedStringSource() public method

public GetSharedStringSource ( ) : NPOI.XSSF.Model.SharedStringsTable
return NPOI.XSSF.Model.SharedStringsTable

GetSheet() public method

public GetSheet ( String name ) : ISheet
name String
return ISheet

GetSheetAt() public method

public GetSheetAt ( int index ) : ISheet
index int
return ISheet

GetSheetIndex() public method

public GetSheetIndex ( ISheet sheet ) : int
sheet ISheet
return int

GetSheetIndex() public method

Returns the index of the sheet by his name (case insensitive match)
public GetSheetIndex ( String name ) : int
name String the sheet name
return int

GetSheetName() public method

public GetSheetName ( int sheetIx ) : String
sheetIx int
return String

GetStylesSource() public method

public GetStylesSource ( ) : NPOI.XSSF.Model.StylesTable
return NPOI.XSSF.Model.StylesTable

GetTheme() public method

public GetTheme ( ) : NPOI.XSSF.Model.ThemesTable
return NPOI.XSSF.Model.ThemesTable

IndexOf() public method

public IndexOf ( ISheet item ) : int
item ISheet
return int

Insert() public method

public Insert ( int index, ISheet item ) : void
index int
item ISheet
return void

IsMacroEnabled() public method

public IsMacroEnabled ( ) : bool
return bool

IsRevisionLocked() public method

public IsRevisionLocked ( ) : bool
return bool

IsSheetHidden() public method

public IsSheetHidden ( int sheetIx ) : bool
sheetIx int
return bool

IsSheetVeryHidden() public method

public IsSheetVeryHidden ( int sheetIx ) : bool
sheetIx int
return bool

IsStructureLocked() public method

public IsStructureLocked ( ) : bool
return bool

IsWindowsLocked() public method

public IsWindowsLocked ( ) : bool
return bool

LinkExternalWorkbook() public method

public LinkExternalWorkbook ( String name, IWorkbook workbook ) : int
name String
workbook IWorkbook
return int

LockRevision() public method

public LockRevision ( ) : void
return void

LockStructure() public method

public LockStructure ( ) : void
return void

LockWindows() public method

public LockWindows ( ) : void
return void

Remove() public method

public Remove ( ISheet item ) : bool
item ISheet
return bool

RemoveAt() public method

public RemoveAt ( int index ) : void
index int
return void

RemoveName() public method

public RemoveName ( String name ) : void
name String
return void

RemoveName() public method

public RemoveName ( NPOI.XSSF.UserModel.XSSFName name ) : void
name NPOI.XSSF.UserModel.XSSFName
return void

RemoveName() public method

public RemoveName ( int nameIndex ) : void
nameIndex int
return void

RemovePrintArea() public method

public RemovePrintArea ( int sheetIndex ) : void
sheetIndex int
return void

RemoveSheetAt() public method

public RemoveSheetAt ( int index ) : void
index int
return void

SetActiveSheet() public method

public SetActiveSheet ( int sheetIndex ) : void
sheetIndex int
return void

SetForceFormulaRecalculation() public method

public SetForceFormulaRecalculation ( bool value ) : void
value bool
return void

SetPrintArea() public method

public SetPrintArea ( int sheetIndex, String reference ) : void
sheetIndex int
reference String
return void

SetPrintArea() public method

public SetPrintArea ( int sheetIndex, int startColumn, int endColumn, int startRow, int endRow ) : void
sheetIndex int
startColumn int
endColumn int
startRow int
endRow int
return void

SetSelectedTab() public method

public SetSelectedTab ( int index ) : void
index int
return void

SetSheetHidden() public method

public SetSheetHidden ( int sheetIx, SheetState state ) : void
sheetIx int
state SheetState
return void

SetSheetHidden() public method

public SetSheetHidden ( int sheetIx, bool hidden ) : void
sheetIx int
hidden bool
return void

SetSheetHidden() public method

Hide or unhide a sheet.
public SetSheetHidden ( int sheetIx, int hidden ) : void
sheetIx int The sheet number
hidden int 0 for not hidden, 1 for hidden, 2 for very hidden
return void

SetSheetName() public method

public SetSheetName ( int sheetIndex, String sheetname ) : void
sheetIndex int
sheetname String
return void

SetSheetOrder() public method

public SetSheetOrder ( String sheetname, int pos ) : void
sheetname String
pos int
return void

UnlockRevision() public method

public UnlockRevision ( ) : void
return void

UnlockStructure() public method

public UnlockStructure ( ) : void
return void

UnlockWindows() public method

public UnlockWindows ( ) : void
return void

XSSFWorkbook() public method

public XSSFWorkbook ( ) : System.Text.RegularExpressions
return System.Text.RegularExpressions

XSSFWorkbook() public method

public XSSFWorkbook ( FileInfo file ) : System.Text.RegularExpressions
file System.IO.FileInfo
return System.Text.RegularExpressions

XSSFWorkbook() public method

public XSSFWorkbook ( NPOI.OpenXml4Net.OPC.OPCPackage pkg ) : System.Text.RegularExpressions
pkg NPOI.OpenXml4Net.OPC.OPCPackage
return System.Text.RegularExpressions

XSSFWorkbook() public method

public XSSFWorkbook ( Stream is1 ) : System.Text.RegularExpressions
is1 Stream
return System.Text.RegularExpressions

XSSFWorkbook() public method

public XSSFWorkbook ( String path ) : System.Text.RegularExpressions
path String
return System.Text.RegularExpressions

newPackage() protected static method

protected static newPackage ( ) : NPOI.OpenXml4Net.OPC.OPCPackage
return NPOI.OpenXml4Net.OPC.OPCPackage

this() public method

public this ( int index ) : ISheet
index int
return ISheet

Property Details

DEFAULT_CHARACTER_WIDTH public_oe static_oe property

public static float DEFAULT_CHARACTER_WIDTH
return float

PICTURE_TYPE_BMP public_oe static_oe property

public static int PICTURE_TYPE_BMP
return int

PICTURE_TYPE_DIB public_oe static_oe property

public static int PICTURE_TYPE_DIB
return int

PICTURE_TYPE_EMF public_oe static_oe property

public static int PICTURE_TYPE_EMF
return int

PICTURE_TYPE_EPS public_oe static_oe property

public static int PICTURE_TYPE_EPS
return int

PICTURE_TYPE_GIF public_oe static_oe property

public static int PICTURE_TYPE_GIF
return int

PICTURE_TYPE_JPEG public_oe static_oe property

public static int PICTURE_TYPE_JPEG
return int

PICTURE_TYPE_PICT public_oe static_oe property

public static int PICTURE_TYPE_PICT
return int

PICTURE_TYPE_PNG public_oe static_oe property

public static int PICTURE_TYPE_PNG
return int

PICTURE_TYPE_TIFF public_oe static_oe property

public static int PICTURE_TYPE_TIFF
return int

PICTURE_TYPE_WMF public_oe static_oe property

public static int PICTURE_TYPE_WMF
return int

PICTURE_TYPE_WPG public_oe static_oe property

public static int PICTURE_TYPE_WPG
return int