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 topLeft)
        {
            Point topLeftAsPoint = topLeft.AsPoint();

            var currentLocation = topLeftAsPoint;

            currentLocation = WriteHeaders(currentLocation);

            currentLocation.Y++;
            currentLocation.X = topLeftAsPoint.X;

            WriteData(ref topLeftAsPoint, ref currentLocation);
        }
Esempio n. 3
0
        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;
            }
        }
Esempio n. 4
0
        public void Write(ExcelCellCoordinate loc)
        {
            var adapter = new DataTableToExcelAdapter(wkSheet, ConvertListOfObjectsToDataTable(listToOutput));

            adapter.Write(loc);
        }
Esempio n. 5
0
 private void button3_Click(object sender, EventArgs e)
 {
     var coord = new ExcelCellCoordinate(5, Convert.ToInt32(this.txtCol.Text));
     Console.WriteLine(coord.ToString());
 }