Namespace EasyXLS

Class ExcelWorksheet


  • public class ExcelWorksheet
    extends ExcelSheet
    This class simulates a worksheet. Each worksheet contains a table, it has a title, and can be selected or protected.
    • Constructor Summary

      Constructors 
      Constructor Description
      ExcelWorksheet()
      Defines an instance of the worksheet.
      ExcelWorksheet​(System.String sheetName)
      Defines an instance of the worksheet that has the worksheet name defined.
    • Method Summary

      Modifier and Type Method Description
      bool AllowDeleteColumns()
      Returns true if deleting columns is allowed when the sheet is protected, false otherwise.
      bool AllowDeleteRows()
      Returns true if deleting rows is allowed when the sheet is protected, false otherwise.
      bool AllowEditObjects()
      Returns true if editing objects is allowed when the sheet is protected, false otherwise.
      bool AllowEditScenarios()
      Returns true if editing scenarios is allowed when the sheet is protected, false otherwise.
      bool AllowFormatCells()
      Returns true if formatting cells is allowed when the sheet is protected, false otherwise.
      bool AllowFormatColumns()
      Returns true if formatting columns is allowed when the sheet is protected, false otherwise.
      bool AllowFormatRows()
      Returns true if formatting rows is allowed when the sheet is protected, false otherwise.
      bool AllowInsertColumns()
      Returns true if inserting columns is allowed when the sheet is protected, false otherwise.
      bool AllowInsertHyperlinks()
      Returns true if inserting hyperlinks is allowed when the sheet is protected, false otherwise.
      bool AllowInsertRows()
      Returns true if inserting rows is allowed when the sheet is protected, false otherwise.
      bool AllowSelectLockedCells()
      Returns true if the selection of locked cells is allowed when the sheet is protected, false otherwise.
      bool AllowSelectUnlockedCells()
      Returns true if the selection of unlocked cells is allowed when the sheet is protected, false otherwise.
      bool AllowSort()
      Returns true if sorting is allowed when the sheet is protected, false otherwise.
      bool AllowUseAutofilter()
      Returns true if autofilter is allowed when the sheet is protected, false otherwise.
      bool AllowUsePivots()
      Returns true if using pivot tables and pivot charts is allowed when the sheet is protected, false otherwise.
      int ArrayFormulasCount()
      Returns the number of array formulas in the worksheet.
      int ChartCount()
      Returns the number of charts in the worksheet.
      ExcelSheet Clone()
      Creates and returns a copy of this object.
      int ConditionalFormattingCount()
      Returns the number of conditional formatting ranges in the worksheet.
      int DataGroupCount()
      Returns the number of data groups in the worksheet.
      int DataValidatorCount()
      Returns the number of data validators in the worksheet.
      void Dispose()
      Disposes any resources that it has allocated.
      void easy_addArrayFormula​(int startRow, int startColumn, int endRow, int endColumn, System.String sFormula)
      Adds an array formula at the specified range to worksheet.
      void easy_addArrayFormula​(System.String s2DRangeReference, System.String sFormula)
      Adds an array formula at the specified range to worksheet.
      void easy_addChart​(ExcelChart xlsChart)
      Adds the specified chart to worksheet.
      void easy_addChart​(ExcelChart xlsChart, int row, int column)
      Adds a chart that has the specified location to worksheet.
      void easy_addChart​(ExcelChart xlsChart, int row, int column, int width, int height)
      Adds a chart that has the specified location and size to worksheet.
      void easy_addChart​(ExcelChart xlsChart, System.String position)
      Adds a chart that has the specified location to worksheet.
      void easy_addChart​(ExcelChart xlsChart, System.String position, int width, int height)
      Adds a chart that has the specified location and size to worksheet.
      void easy_addConditionalFormatting​(int firstRow, int firstColumn, int lastRow, int lastColumn, List lstConditions)
      Adds a conditional formatting at the specified range to worksheet.
      void easy_addConditionalFormatting​(ExcelConditionalFormatting xlsConditionalFormatting)
      Adds the specified conditional formatting range to worksheet.
      void easy_addConditionalFormatting​(System.String range, int nOperator, System.String firstFormula, System.String secondFormula)
      Adds a conditional formatting having the specified range, operator and formula restrictions to worksheet.
      void easy_addConditionalFormatting​(System.String range, int nOperator, System.String firstFormula, System.String secondFormula, bool isBold, bool isItalic, ThemeColor foreground, ThemeColor background)
      Adds a conditional formatting having the specified range, operator, formulas restrictions, font settings and background to worksheet.
      void easy_addConditionalFormatting​(System.String range, int nOperator, System.String firstFormula, System.String secondFormula, bool isBold, bool isItalic, System.Drawing.Color foreground)
      Adds a conditional formatting having the specified range, operator, formulas restrictions and font settings to worksheet.
      void easy_addConditionalFormatting​(System.String range, int nOperator, System.String firstFormula, System.String secondFormula, bool isBold, bool isItalic, System.Drawing.Color foreground, System.Drawing.Color background)
      Adds a conditional formatting having the specified range, operator, formulas restrictions, font settings and background to worksheet.
      void easy_addConditionalFormatting​(System.String range, int nOperator, System.String firstFormula, System.String secondFormula, ThemeColor background)
      Adds a conditional formatting having the specified range, operator, formulas restrictions and background to worksheet.
      void easy_addConditionalFormatting​(System.String range, int nOperator, System.String firstFormula, System.String secondFormula, System.Drawing.Color background)
      Adds a conditional formatting having the specified range, operator, formulas restrictions and background to worksheet.
      void easy_addConditionalFormatting​(System.String range, List lstConditions)
      Adds a conditional formatting at the specified range to worksheet.
      void easy_addDataGroup​(int firstRow, int firstColumn, int lastRow, int lastColumn, int groupRowsColumns, bool isCollapsed)
      Adds a data group having the specified position, grouping per rows or colums and collapse option to worksheet.
      void easy_addDataGroup​(int firstRow, int firstColumn, int lastRow, int lastColumn, int groupRowsColumns, bool isCollapsed, ExcelAutoFormat xlsAutoFormat)
      Adds a data group having the specified position, grouping per rows or colums and collapse option to worksheet.
      void easy_addDataGroup​(ExcelDataGroup xlsGroup)
      Adds the specified data group to worksheet.
      void easy_addDataGroup​(System.String range, int groupRowsColumns, bool isCollapsed)
      Adds a data group having the specified position, grouping per rows or colums and collapse option to worksheet.
      void easy_addDataGroup​(System.String range, int groupRowsColumns, bool isCollapsed, ExcelAutoFormat xlsAutoFormat)
      Adds a data group having the specified position, grouping per rows or colums and collapse option to worksheet.
      void easy_addDataValidator​(int firstRow, int firstColumn, int lastRow, int lastColumn, int validationType, int operatorType, System.String firstFormula, System.String secondFormula)
      Adds a data validator having the specified position, validation type, operator and formula restrictions to worksheet.
      void easy_addDataValidator​(ExcelDataValidator xlsValidator)
      Adds the specified data validator to worksheet.
      void easy_addDataValidator​(System.String range, int validationType, int operatorType, System.String firstFormula, System.String secondFormula)
      Adds a data validator having the specified position, validation type, operator and formulas restrictions to worksheet.
      void easy_addFooter​(ExcelFooter xlsFooter)
      Adds the specified footer to worksheet.
      void easy_addFooter​(System.String text, System.String position)
      Adds the footer having the specified text and position to worksheet.
      void easy_addFooter​(System.String text, System.String position, System.String fontName, int fontSize, bool isBold, bool isItalic)
      Adds the footer having the specified text, position and font settings to worksheet.
      void easy_addHeader​(ExcelHeader xlsHeader)
      Adds the specified header to worksheet.
      void easy_addHeader​(System.String text, System.String position)
      Adds the header having the specified text and position to worksheet.
      void easy_addHeader​(System.String text, System.String position, System.String fontName, int fontSize, bool isBold, bool isItalic)
      Adds the header having the specified text, position and font settings to worksheet.
      void easy_addHyperlink​(ExcelHyperlink xlsHyperlink)
      Adds the specified hyperlink to worksheet.
      void easy_addHyperlink​(System.String hyperlinkType, System.String url, System.String position)
      Adds a hyperlink having the specified type, url and position to worksheet.
      void easy_addHyperlink​(System.String hyperlinkType, System.String url, System.String tooltip, System.String position)
      Adds a hyperlink having the specified type, url, tooltip and position to worksheet.
      void easy_addImage​(System.String path, int row, int column)
      Adds an image that has the specified path and location to worksheet.
      void easy_addImage​(System.String path, int row, int column, int width, int height)
      Adds an image that has the specified path, location and size to worksheet.
      void easy_addImage​(System.String path, System.String position)
      Adds an image that has the specified path and location to worksheet.
      void easy_addImage​(System.String path, System.String position, int width, int height)
      Adds an image that has the specified path, location and size to worksheet.
      void easy_addName​(ExcelName xlsName)
      Adds the specified name to worksheet.
      void easy_addName​(System.String sNameText, System.String sRefersTo)
      Adds a name having the specified title and formula to worksheet.
      void easy_addPivotChart​(ExcelPivotChart xlsPivotChart)
      Adds a pivot chart to the worksheet.
      void easy_addPivotTable​(ExcelPivotTable xlsPivotTable)
      Adds a pivot table to the worksheet.
      void easy_addPivotTable​(System.String name, System.String location, System.String sourceFormulaRange, ExcelDocument xls)
      Adds a pivot table having the specified name, location and data source to the worksheet.
      System.String easy_computeFormulas​(ExcelDocument excel, bool recalculateFormula)
      Calculates all formulas existing in the cells of this ExcelWorksheet
      ExcelArrayFormula easy_getArrayFormulaAt​(int index)
      Returns the array formula from the specified index.
      ExcelArrayFormula easy_getArrayFormulaAt​(int nRow, int nColumn)
      Returns the array formula located at the specified row number and row column.
      ExcelArrayFormula easy_getArrayFormulaAt​(System.String range)
      Returns the array formula located at the specified range.
      ExcelChart easy_getChartAt​(int index)
      Returns the chart from the specified index.
      ExcelConditionalFormatting easy_getConditionalFormattingAt​(int index)
      Returns the conditional formatting range from the specified index.
      ExcelConditionalFormatting easy_getConditionalFormattingAt​(System.String range)
      Returns the conditional formatting from the specified range.
      ExcelDataGroup easy_getDataGroupAt​(int index)
      Returns the data group from the specified index.
      ExcelDataGroup easy_getDataGroupAt​(System.String range)
      Returns the data group from the specified range.
      ExcelDataValidator easy_getDataValidatorAt​(int index)
      Returns the data validator from the specified index.
      ExcelDataValidator easy_getDataValidatorAt​(System.String range)
      Returns the data validator from the specified range.
      ExcelTable easy_getExcelTable()
      Returns the table of the worksheet.
      ExcelFilter easy_getFilter()
      Returns the filter for the worksheet.
      ExcelFooter easy_getFooterAt​(int index)
      Returns the footer from the specified index.
      ExcelFooter easy_getFooterAt​(System.String position)
      Returns the footer from the specified position.
      ExcelHeader easy_getHeaderAt​(int index)
      Returns the header from the specified index.
      ExcelHeader easy_getHeaderAt​(System.String position)
      Returns the header from the specified position.
      ExcelHyperlink easy_getHyperlinkAt​(int index)
      Returns the hyperlink from the specified index.
      ExcelHyperlink easy_getHyperlinkAt​(int nRow, int nColumn)
      Returns the hyperlink at the specified row index and column index.
      ExcelHyperlink easy_getHyperlinkAt​(System.String position)
      Returns the hyperlink from the specified index.
      ExcelName easy_getName​(System.String sNameText)
      Returns the name having the specified title.
      ExcelName easy_getNameAt​(int index)
      Returns the name from the specified index.
      ExcelPageSetup easy_getPageSetup()
      Returns the page setup options for the worksheet.
      ExcelPivotTable easy_getPivotTable​(System.String name)
      Returns the pivot table having the specified name.
      ExcelPivotTable easy_getPivotTableAt​(int index)
      Returns the pivot table from the specified index.
      void easy_insertList​(List list)
      Inserts the data from the specified List object into this ExcelWorksheet starting from the first row and first column of the worksheet data table.
      void easy_insertList​(List list, int startRow, int startCol)
      Inserts the data from the specified List object into this ExcelWorksheet starting from the startRow row index and startCol column index.
      void easy_insertList​(List list, int startRow, int startCol, ExcelAutoFormat xlsAutoFormat)
      Inserts the data from the specified List object into this ExcelWorksheet starting from the startRow row index and startCol column index.
      void easy_insertList​(List list, ExcelAutoFormat xlsAutoFormat)
      Inserts the data from the specified List object into this ExcelWorksheet starting from the first row and first column of the worksheet data table.
      void easy_insertList​(List list, System.String startCellReference)
      Inserts the data from the specified List object into this ExcelWorksheet starting with the specified cell.
      void easy_insertList​(List list, System.String startCellReference, ExcelAutoFormat xlsAutoFormat)
      Inserts the data from the specified List object into this ExcelWorksheet starting with the specified cell.
      void easy_insertDataSet​(System.Data.DataSet rs, bool includeColumnNames)
      Inserts the data from the specified DataSet object into this ExcelWorksheet starting from first row and first column of the worksheet data table
      void easy_insertDataSet​(System.Data.DataSet rs, int startRow, int startCol, bool includeColumnNames)
      Inserts the data from the specified DataSet object into this ExcelWorksheet starting from the nStartRow row index and nStartCol column index
      void easy_insertDataSet​(System.Data.DataSet rs, int startRow, int startCol, ExcelAutoFormat xlsAutoFormat, bool includeColumnNames)
      Inserts the data from the specified DataSet object into this ExcelWorksheet starting from the nStartRow row index and nStartCol column index
      void easy_insertDataSet​(System.Data.DataSet rs, ExcelAutoFormat xlsAutoFormat, bool includeColumnNames)
      Inserts the data from the specified DataSet object into this ExcelWorksheet starting from first row and first column of the worksheet data table.
      void easy_insertDataSet​(System.Data.DataSet rs, System.String startCellReference, bool includeColumnNames)
      Inserts the data from the specified DataSet object into this ExcelWorksheet starting with the specified cell
      void easy_insertDataSet​(System.Data.DataSet rs, System.String startCellReference, ExcelAutoFormat xlsAutoFormat, bool includeColumnNames)
      Inserts the data from the specified DataSet object into this ExcelWorksheet starting with the specified cell
      void easy_insertXMLFromFile​(System.IO.Stream f)
      Inserts the XML data from the specified stream into this ExcelWorksheet starting from first row and first column of the worksheet data table
      void easy_insertXMLFromFile​(System.IO.Stream f, int startRow, int startCol)
      Inserts the XML data from the specified stream into this ExcelWorksheet starting from the nStartRow row index and nStartCol column index
      void easy_insertXMLFromFile​(System.IO.Stream f, System.String startCellReference)
      Inserts the XML data from the specified stream into this ExcelWorksheet starting with the specified cell
      void easy_insertXMLFromFile​(System.String path)
      Inserts the XML data from the specified XML file into this ExcelWorksheet starting from first row and first column of the worksheet data table
      void easy_insertXMLFromFile​(System.String path, int startRow, int startCol)
      Inserts the XML data from the specified XML file into this ExcelWorksheet starting from the nStartRow row index and nStartCol column index
      void easy_insertXMLFromFile​(System.String path, System.String startCellReference)
      Inserts the XML data from the specified XML file into this ExcelWorksheet starting with the specified cell
      void easy_insertXMLFromString​(System.String xml)
      Inserts the XML data from the specified string into this ExcelWorksheet starting from first row and first column of the worksheet data table
      void easy_insertXMLFromString​(System.String xml, int startRow, int startCol)
      Inserts the XML data from the specified string into this ExcelWorksheet starting from the nStartRow row index and nStartCol column index
      void easy_insertXMLFromString​(System.String xml, System.String startCellReference)
      Inserts the XML data from the specified XML file into this ExcelWorksheet starting with the specified cell
      void easy_removeArrayFormula​(int index)
      Removes the array formula from the specified index.
      void easy_removeArrayFormula​(int startRow, int startColumn, int endRow, int endColumn)
      Removes the array formula located at the specified reference.
      void easy_removeArrayFormula​(System.String s2DRangeReference)
      Removes the array formula located at the specified reference.
      void easy_removeChart​(int index)
      Removes the chart from the specified index.
      void easy_removeConditionalFormatting​(int index)
      Removes the conditional formatting range from the specified index.
      void easy_removeConditionalFormatting​(System.String range)
      Removes the conditional formatting from the specified range.
      void easy_removeDataGroup​(int index)
      Removes the data group from the specified index.
      void easy_removeDataGroup​(System.String range)
      Removes the data group from the specified range.
      void easy_removeDataValidator​(int index)
      Removes the data validator from the specified index.
      void easy_removeDataValidator​(System.String range)
      Removes the data validator from the specified range.
      void easy_removeFooter​(int index)
      Removes the footer from the specified index.
      void easy_removeFooter​(System.String position)
      Removes the footer from the specified position.
      void easy_removeHeader​(int index)
      Removes the header from the specified index.
      void easy_removeHeader​(System.String position)
      Removes the header from the specified position.
      void easy_removeHyperlink​(int index, bool clearCellValue)
      Removes the hyperlink from the specified index.
      void easy_removeHyperlink​(System.String position, bool clearCellValue)
      Removes the hyperlink from the specified position.
      void easy_removeName​(int index)
      Removes the name from the specified index.
      void easy_removeName​(System.String sNameText)
      Removes the name having the specified title.
      void easy_removePivotTable​(int index)
      Removes the pivot table from the specified index.
      void easy_setExcelTable​(ExcelTable xlsTable)
      Sets the table of the worksheet.
      int FooterCount()
      Returns the number of footers in the worksheet.
      int getColumnMaxOutlineLevel()
      Returns the highest number of outline levels for columns in this sheet.
      int getRowMaxOutlineLevel()
      Returns the highest number of outline levels for rows in this sheet.
      int HeaderCount()
      Returns the number of headers in the worksheet.
      int HyperlinkCount()
      Returns the number of hyperlinks in the worksheet.
      bool IsDataGroupAutomaticStyles()
      Returns the automatic style option when grouping data.
      bool IsDataGroupSummaryColumnsRight()
      Returns true if the summary columns to right of detail option is set when grouping data, false otherwise.
      bool IsDataGroupSummaryRowsBelow()
      Returns true if the summary rows below detail option is set when grouping data, false otherwise.
      bool IsPageBreakPreview()
      Returns the page break preview option of the worksheet.
      int NameCount()
      Returns the number of names in the worksheet.
      int PivotTableCount()
      Returns the number of pivot tables in the worksheet.
      void PopulateSheet()
      Populates the BIFF list by the default BIFF records for a worksheet.
      void RestoreDefaults()
      Internal use only
      void setAllowDeleteColumns​(bool allow)
      Sets if deleting columns is allowed when the sheet is protected.
      void setAllowDeleteRows​(bool allow)
      Sets if deleting rows is allowed when the sheet is protected.
      void setAllowEditObjects​(bool allow)
      Sets if editing objects is allowed when the sheet is protected.
      void setAllowEditScenarios​(bool allow)
      Sets if editing scenarios is allowed when the sheet is protected.
      void setAllowFormatCells​(bool allow)
      Sets if formatting cells is allowed when the sheet is protected.
      void setAllowFormatColumns​(bool allow)
      Sets if formatting columns is allowed when the sheet is protected.
      void setAllowFormatRows​(bool allow)
      Sets if formatting rows is allowed when the sheet is protected.
      void setAllowInsertColumns​(bool allow)
      Sets if inserting columns is allowed when the sheet is protected.
      void setAllowInsertHyperlinks​(bool allow)
      Sets if inserting hyperlinks is allowed when the sheet is protected.
      void setAllowInsertRows​(bool allow)
      Sets if inserting rows is allowed when the sheet is protected.
      void setAllowSelectLockedCells​(bool allow)
      Sets if the selection of locked cells is allowed when the sheet is protected.
      void setAllowSelectUnlockedCells​(bool allow)
      Sets if the selection of unlocked cells is allowed when the sheet is protected.
      void setAllowSort​(bool allow)
      Sets if sorting is allowed when the sheet is protected.
      void setAllowUseAutofilter​(bool allow)
      Sets if autofilter is allowed when the sheet is protected.
      void setAllowUsePivots​(bool allow)
      Sets if using pivot tables and pivot charts is allowed when the sheet is protected.
      void setColumnMaxOutlineLevel​(int nOutlineLevel)
      Sets the highest number of outline levels for columns in this sheet.
      void setDataGroupAutomaticStyles​(bool isDataGroupAutomaticStyles)
      Sets the automatic style option when grouping data.
      void setDataGroupSummaryColumnsRight​(bool isDataGroupSummaryColumnsRight)
      Sets the summary columns to right of detail option when grouping data.
      void setDataGroupSummaryRowsBelow​(bool isDataGroupSummaryRowsBelow)
      Sets the summary rows below detail option when grouping data.
      void setPageBreakPreview​(bool isPageBreakPreview)
      Sets the page break preview option for the worksheet.
      void setRowMaxOutlineLevel​(int nOutlineLevel)
      Sets the highest number of outline levels for rows in this sheet.
      void setShowGridlines​(bool show)
      Sets the visibility option for the gridlines of the worksheet.
      bool ShowGridlines()
      Returns true if the gridlines are visible in a worksheet, false otherwise.
      • Methods inherited from class EasyXLS.BIFF_Records.SheetStream

        biffList, BIFFsLength