public void Write(ExcelCellCoordinate topLeft) { Point topLeftAsPoint = topLeft.AsPoint(); var currentLocation = topLeftAsPoint; currentLocation = WriteHeaders(currentLocation); currentLocation.Y++; currentLocation.X = topLeftAsPoint.X; WriteData(ref topLeftAsPoint, ref currentLocation); }
public void Write(ExcelCellCoordinate loc, int columns) { var currentRow = loc.Row; var currentCol = loc.Col; try { foreach (var val in this.listToOutput) { wkSheet.Cells[currentRow, currentCol++] = val; if (currentCol > (loc.Col + columns - 1)) { currentCol = loc.Col; currentRow++; } } } catch (System.NullReferenceException e) { Console.WriteLine(e.ToString()); throw e; } }
public void Write(ExcelCellCoordinate loc) { var adapter = new DataTableToExcelAdapter(wkSheet, ConvertListOfObjectsToDataTable(listToOutput)); adapter.Write(loc); }
private void button3_Click(object sender, EventArgs e) { var coord = new ExcelCellCoordinate(5, Convert.ToInt32(this.txtCol.Text)); Console.WriteLine(coord.ToString()); }