Click or drag to resize

Workbook Class

Inheritance Hierarchy
SystemObject
  Spire.XlsWorkbook

Namespace:  Spire.Xls
Assembly:  Spire.XLS (in Spire.XLS.dll) Version: 11.9.3.0 (11.9.3.5040)
Syntax
public sealed class Workbook : IDisposable

The Workbook type exposes the following members.

Constructors
  NameDescription
Public methodWorkbook
Create a new instance of workbook.
Top
Properties
  NameDescription
Public propertyActiveSheet
Returns an object that represents the active sheet (the sheet on top) in the active workbook or in the specified window or workbook. Returns Nothing if no sheet is active. Read-only.
Public propertyActiveSheetIndex
Gets or sets index of the active worksheet.
Public propertyAddInFunctions
Returns collection of add-in functions.
Public propertyAllow3DRangesInDataValidation
Public propertyCalculationMode
Get or set calculation mode.
Public propertyCharts
Returns a Sheets collection that represents all the chart sheets in the specified workbook. Read-only.
Public propertyChartsheets
Public propertyCheckComptiliblity
Public propertyCodeName
Name which used by macros to access to workbook items.
Public propertyColors
Returns colors in the palette for the workbook. The palette has 56 entries, each represented by an RGB value. Read/write Object.
Public propertyConverterSetting
Public propertyCustomDocumentProperties
Public propertyCustomFontFileDirectory
Sets the custom directory of font files.
Public propertyCustomFontFilePaths
Returns or sets the custom path of font files.
Public propertyCustomTableStyles
Public propertyDataConns
Public propertyDataSorter
Gets Data sorter to sort the data..
Public propertyDate1904
True if the workbook uses the 1904 date system. Read/write Boolean.
Public propertyDefaultFontName
Returns or sets the name of the default font.
Public propertyDefaultFontSize
Returns or sets the default font size.
Public propertyDisableMacrosStart
Allows users to disable load of macros from document.
Public propertyDocumentProperties
Returns a BuiltInDocumentProperties collection that represents all the built-in document properties for the specified workbook. Read-only.
Public propertyExternalLinks
Public propertyFileName
Gets file name.
Public propertyHasMacros
Indicates whether contains VBA macros.
Public propertyHasTrackedChanges
Indicates whether the workbook has any tracked changes
Public propertyIsCellProtection
Indicates whether cells are protected.
Public propertyIsDigitallySigned
Indicates whether this spreadsheet is digitally signed.
Public propertyIsHideWindow
Hide window
Public propertyIsHScrollBarVisible
Returns or sets whether show horizontal scroll bar.
Public propertyIsRightToLeft
Indicates whether worksheet is displayed right to left.
Public propertyIsSaved
Indicates whether workbook changes have been saved.
Public propertyIsVScrollBarVisible
Returns or sets whether show vertical scroll bar.
Public propertyIsWindowProtection
Indicates window is protected.
Public propertyMarkerDesigner
Public propertyMaxColumnCount
Public propertyMaxDigitWidth
Public propertyMaxRowCount
Public propertyMaxRowsOfSharedFormula
Public propertyNameRanges
Public propertyOpenPassword
Returns or sets password to encrypt document.
Public propertyOptimizeImport
Indicates whether to optimize Import data. This option will take effect only on Import methods that are available with the worksheet WARNING: Setting this property to True can decrease memory significantly, but will increase the performance of data import .
Public propertyPivotCaches
Public propertyPrintDialog
Public propertyPrintDocument
Gets the PrintDocument
Public propertyReadOnly
Indicates whether the workbook has been opened as Read-only.
Public propertySelectedTab
Gets or sets tab index of selected.
Public propertySheetTabBarWidth
Returns or sets the width of worksheet tab bar. 1/1000 of window width.
Public propertyShowTabs
Get or sets a value whether the Workbook tabs are displayed.
Public propertyStyles
Returns a Styles collection that represents all the styles in the specified workbook. Read-only.
Public propertyUseStorageMode
User Compound storage mode
Public propertyVersion
Public propertyWorksheets
Returns a Sheets collection that represents all the worksheets in the specified workbook. Read-only Sheets object.
Public propertyWriteProtection
Returns options of the workbook write protection.
Top
Methods
  NameDescription
Public methodAcceptAllTrackedChanges
Accept all tracked changes in the workbook.
Public methodAddDigitalSignature
Add a DigitalSignature.
Public methodAddPivotTableStyle
Public methodCaculateFormulaValue
Computes the string formula
Public methodCalculateAllValue
Caculate all formula for the workbook
Public methodChangePaletteColor
Changes the palette for the spreadsheet in the specified index.
Public methodColumnWidthToPixels
onverts column width in characters into column width in pixels.
Public methodContainsFont
Indicates whether the workbook contains specified font.
Public methodCopyTheme
Copy the theme from source workbook
Public methodCopyThemeColor
Copy the theme color from source workbook
Public methodCopyToClipboard
Copies whole workbook to the clipboard.
Public methodCopyToClipboard(Worksheet)
Copies the selected worksheet to clipboard.
Public methodCreateEmptySheet
Create a new worksheet.
Public methodCreateEmptySheet(String)
Create a new worksheet.
Public methodCreateEmptySheets(Int32)
Create workbook with specified number of worksheets.
Public methodCreateEmptySheets(String)
Create workbook with specified names of worksheets.
Public methodCreateFont
Creates a font object and add it to the workbook.
Public methodCreateFont(Font)
Public methodCreatePivotStyle
Public methodDispose
Releases all resources used by the Workbook
Public methodEquals (Inherited from Object.)
Public methodFindAllBool
Finds the cell with the input bool.
Public methodFindAllDateTime
Finds the cell with the input datetime.
Public methodFindAllNumber
Finds the cell with the input double.
Public methodFindAllString
Finds the cell with the input string.
Public methodFindAllTimeSpan
Finds the cell with the input time span.
Public methodFindBool
Finds the cell with the input bool.
Public methodFindDateTime
Finds the cell with the input datetime.
Public methodFindNumber
Finds the cell with the input number.
Public methodFindString
Finds the cell with the input string.
Public methodFindTimeSpan
Finds the cell with the input time span.
Public methodGetChartSheetByName
Public methodGetCustomFontParsedResult
Get result that parse the custom path of font files
Public methodGetDigitalSignatures
Get collection of DigitalSignature in this file.
Public methodGetHashCode (Inherited from Object.)
Public methodGetMatchingColor(Color)
Find best matching Color in workbook palette.
Public methodGetMatchingColor(Int32, Int32, Int32)
Find best matching Color in workbook palette.
Public methodGetOleSize
get the size of the visible range of cells when this workbook is displyed as an embedded obect in another document;
Public methodGetPaletteColor
Gets excel color from workbook palette.
Public methodGetSafeSheetName(String)
Public methodGetSafeSheetName(String, Char)
Public methodGetSplitPageInfo
Public methodGetSplitPageTable
Public methodGetThemeColor
Gets theme color.
Public methodGetType (Inherited from Object.)
Public methodInitCalcEngine
Initilize Calc engine
Public methodStatic memberIsPasswordProtected
check file is password protect
Public methodLoadFromFile(String)
Loads a file and imports its data.
Public methodLoadFromFile(String, ExcelVersion)
Loads a file and imports its data.
Public methodLoadFromFile(String, Boolean)
Loads a file and imports its data.
Public methodLoadFromFile(String, String)
Loads text files stream with user defined separator.
Public methodLoadFromFile(String, String, Int32, Int32)
Loads text files with user defined separator.
Public methodLoadFromFile(String, String, Int32, Int32, ExcelVersion)
Loads text files with user defined separator.
Public methodLoadFromFile(String, String, Int32, Int32, ExcelVersion, Encoding)
Loads text files with user defined separator.
Public methodLoadFromHtml(Stream)
Loads a html file and imports its data.
Public methodLoadFromHtml(String)
Loads a html file and imports its data.
Public methodLoadFromMHtml(Stream)
Loads a Mhtml file and imports its data.
Public methodLoadFromMHtml(String)
Loads a Mhtml file and imports its data.
Public methodLoadFromStream(Stream)
Load workbook from the stream.
Public methodLoadFromStream(Stream, ExcelVersion)
Load workbook from the stream.
Public methodLoadFromStream(Stream, Boolean)
Load workbook from the stream.
Public methodLoadFromStream(Stream, String, Int32, Int32)
Loads text files stream with user defined separator.max row 60000.
Public methodLoadFromStream(Stream, String, Int32, Int32, ExcelVersion)
Loads text files stream with user defined separator. Version2007 support 60000+ row
Public methodLoadFromXml(Stream)
Loads a xml file and imports its data.
Public methodLoadFromXml(String)
Loads a xml file and imports its data.
Public methodLoadTemplateFromFile(String)
Load workbook from the excel template.
Public methodLoadTemplateFromFile(String, Boolean)
Load workbook from the excel template.
Public methodPasteFromClipboard
Copies workbook and all its worksheets from the clipboard.
Public methodPixelsToColumnWidth
Converts column width in pixels into column width in characters.
Public methodProtect(String)
protect file also protect workbook window and structure.
Public methodProtect(String, Boolean, Boolean)
protect file,also Indicates whether protect workbook window and structure or not
Public methodProtectWorkbook
Sets protection for workbook.
Public methodRejectAllTrackedChanges
Reject all tracked changes in the workbook.
Public methodRemoveAllDigitalSignatures
Remove all DigitalSignature in this file.
Public methodReplace(String, DateTime)
Replaces cell's value by specified value.
Public methodReplace(String, Double)
Replaces cell's value by specified value..
Public methodReplace(String, String)
Replaces cell's value by specified value.
Public methodReplace(String, DataColumn, Boolean)
Replaces cell's value from data column values.
Public methodReplace(String, DataTable, Boolean)
Replaces cell's value from data table values.
Public methodReplace(String, Double, Boolean)
Replaces cell's value from array.
Public methodReplace(String, Int32, Boolean)
Replaces cell's value from array.
Public methodReplace(String, String, Boolean)
Replaces cell's value from array.
Public methodResetPalette
Resets the color palette to the default colors.
Public methodSave
Saves changes to the specified workbook
Public methodSaveAsImage(Single, Single)
Public methodSaveAsImage(Int32, Single, Single)
Save workbook to image.
Public methodSaveAsTemplate(String)
Save workbook as template to file.
Public methodSaveAsTemplate(String, HttpResponse)
Save workbook as template to response.
Public methodSaveAsXml(Stream)
Save workbook as XML format to stream.
Public methodSaveAsXml(String)
Save workbook to an XML data file.
Public methodSaveChartAsEmfImage(Worksheet) Obsolete.
Save chart to vector images.
Public methodSaveChartAsEmfImage(Worksheet, Int32) Obsolete.
Save chart to vector image.
Public methodSaveChartAsEmfImage(Worksheet, Int32, Stream)
Save chart to vector image.
Public methodSaveChartAsImage(ChartSheet)
Save chart to image.
Public methodSaveChartAsImage(Worksheet)
Save chart to images.
Public methodSaveChartAsImage(Worksheet, Int32)
Save chart to image.
Public methodSaveToFile(String)
Saves changes to the workbook in a different file
Public methodSaveToFile(String, ExcelVersion)
Saves changes to the workbook in a different file
Public methodSaveToFile(String, FileFormat)
Saves changes to the workbook in a different file
Public methodSaveToFile(String, TextSaveOptions)
Saves changes to the workbook in a different file
Public methodSaveToFile(String, String)
Saves changes to the workbook in a different file
Public methodSaveToFile(String, FileFormat, Boolean)
Saves changes to the workbook in a different file
Public methodSaveToHtml(String)
Public methodSaveToHtml(String, Boolean)
Saves the workbook to html
Public methodSaveToHttpResponse(String, HttpResponse)
Save workbook to the http response.
Public methodSaveToHttpResponse(String, HttpResponse, HttpContentType)
Save workbook to the http response.
Public methodSaveToHttpResponse(String, HttpResponse, Boolean)
Save workbook to the http response.
Public methodSaveToHttpResponse(String, HttpResponse, HttpContentType, FileFormat)
Save workbook to the http response.
Public methodSaveToStream(Stream)
Save workbook the stream
Public methodSaveToStream(Stream, FileFormat)
Save workbook to stream.
Public methodSaveToStream(Stream, String)
Save workbook the stream.
Public methodSetMaxDigitWidth
Public methodSetOleSize
set the size of the visible range of cells when this workbook is displyed as an embedded obect in another document;
Public methodSetThemeColor
Sets the theme color
Public methodSetWriteProtectionPassword
Sets write protection password.
Public methodToString (Inherited from Object.)
Public methodUnProtect
unprotect file also upprotect workbook window and structure
Public methodUnProtect(String)
unprotect file also upprotect workbook window and structure
Public methodUnProtectWorkbook
unprotect workbook window and structure
Top
See Also