예제 #1
0
 /// <summary>
 /// Constructor for accepting a typical Excel Cell name - A1, AZ23, B72, etc
 /// </summary>
 /// <param name="worksheet">Worksheet the cell is on</param>
 /// <param name="excelName">Excel Cell Name</param>
 public ExcelCell(HSSFWorkbook workbook, ISheet worksheet, string excelName)
 {
     _workBook = workbook;
     _style = new ExcelStyle();
     _workSheet = worksheet;
     this.ExcelName = excelName;
     this.parseExcelName();
     this.initializeCell(this.Row, this.Column);
 }
예제 #2
0
 /// <summary>
 /// Constructor for accepting a 0-based row and cell coordinate, and converting to an Excel Cell name
 /// </summary>
 /// <param name="worksheet">Worksheet the cell is on</param>
 /// <param name="row">0-based row number</param>
 /// <param name="column">0-based column number</param>
 public ExcelCell(HSSFWorkbook workbook, ISheet worksheet, int row, int column)
 {
     _workBook = workbook;
     _style = new ExcelStyle();
     _workSheet = worksheet;
     this.Row = row;
     this.Column = column;
     this.parseNumericCellComponents();
     this.initializeCell(row, column);
 }
예제 #3
0
 /// <summary>
 /// Writes a value to a cell with the given style
 /// </summary>
 /// <param name="row">0-based row number</param>
 /// <param name="column">0-based column number</param>
 /// <param name="value">Value to write to cell</param>
 /// <param name="style">Style</param>
 public void WriteCellValue(int row, int column, string value, ExcelStyle style)
 {
     this.initializeCell(row, column);
     _currentCell.Style = style;
     _currentCell.WriteCellValue(value);
 }