BenSelect Documentation
ExcelHelper Class
See Also  Send Feedback
ETI.Report Namespace : ExcelHelper Class
Excel file helper

Public Properties

 NameDescription
public PropertyActiveSheetThe Sheet where we are working on, 1-based(First sheet is 1, not 0). Always set this property before working on a file. You can read or write this value.  
public PropertyActiveSheetNameThe sheet where we are working on, referred by name instead of by index.  
public PropertyColCountNumber of columns actually used on the active sheet.  
public PropertyRowCountNumber of rows actually used on the sheet.  
public PropertySheetCountGets the sheet count.  
Top

Public Methods

 NameDescription
public MethodAutofitColAutofits a range of columns so they adapt their width to show all the text inside.  
public MethodAutofitRowAutofits a range of rows so they adapt their height to show all the text inside. Note that due to GDI+ / GDI incompatibilities, the height calculated by FlexCel will not be exactly the same than the one calculated by Excel. So when you open this workbook in Excel, Excel will re calculate the row heights to what it believes is best. You can change this behavior specifying keepHeightAutomatic = false.  
public MethodDeleteRangeOverloaded. Deletes a range of cells, and moves all cells below up or all cells to the right left, depending on the insert mode.  
public MethodDeleteSheetDeletes the active sheet and aSheetCount-1 sheets more to the right. It will change all formula references to those sheets to invalid.  
public MethodFreezePanesOverloaded. This command is equivalent to Menu->Window->Freeze Panes. It will freeze the rows and columns above and to the left from cell. Note that because Excel works this way, when you SplitWindow the panes are suppressed and vice-versa  
public MethodGetBorderStyleGets the border style.  
public MethodGetCellFormatGets the cell format.  
public MethodGetCellValueGets the cell value.  
public MethodGetColorFromArgbGets the color from ARGB.  
public MethodGetDefaultFormatReturns standard format for an empty cell. (NORMAL format)  
public MethodGetFormatBorderColorGets border's color format.  
public MethodGetFormatBorderStyleGets border's style format.  
public MethodGetFormatFillPatternBackgroundColorGets format fill pattern background color.  
public MethodGetFormatFillPatternForegroundColorGets format fill pattern foreground color.  
public MethodGetFormatFillPatternStyleGets format fill pattern style.  
public MethodGetHorizontalAlignmentGets the horizontal alignment.  
public MethodGetPatternStyleGets the pattern style.  
public MethodGetRowFormatGets the row format.  
public MethodGetVerticalAlignmentGets the vertical alignment.  
public MethodInsertAndCopySheetsInserts and copies sheet "CopyFrom", SheetCount times before InsertBefore. To insert empty sheets, set CopyFrom = 0  
public MethodInsertOrCopyRangeOverloaded. Insert or copy range.  
public MethodMergeCellsMerges a number of cells into one.  
public MethodSetAutoFilterOverloaded. Sets the automatic filter for a range of columns, on the first row.  
public MethodSetCellFormatSets the Cell format (XF) on a range of cells. You can find formats using the ETI.Report.ExcelHelper.GetCellFormat((System.Int32,System.Int32) function.  
public MethodSetCellValueOverloaded. Sets the cell value.  
public MethodSetColFormatSets the format for an entire column.  
public MethodSetColHiddenHides or shows an specific column.  
public MethodSetColWidthSets the width of the column  
public MethodSetFormatBorderColorSets border's color format.  
public MethodSetFormatBorderStyleSets border's style format.  
public MethodSetFormatFillPatternBackgroundColorSets format fill pattern background color.  
public MethodSetFormatFillPatternForegroundColorSets format fill pattern foreground color.  
public MethodSetFormatFillPatternStyleSets format fill pattern style.  
public MethodSetRowFormatSets the XF format for the entire row.  
public MethodSetRowHeightSets the height of the row.  
public MethodSetRowHiddenHides or shows an specific row.  
public MethodSplitWindowThis command is equivalent to Menu->Window->Split. It will split the window in 4 regions. Note that because Excel works this way, when you FreezePanes(String) the windows are unsplitted and vice-versa  
public MethodUnMergeCellsUnmerges the range of cells. The coordinates have to be exact, if there is no merged cell with the exact coordinates, nothing will be done.  
Top

Inheritance Hierarchy

System.Object
   ETI.Report.ExcelHelper

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2024 All Rights Reserved.