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);
        }
예제 #2
0
        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);
        }
예제 #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;
            }
        }
예제 #4
0
        public void Write(ExcelCellCoordinate loc)
        {
            var adapter = new DataTableToExcelAdapter(wkSheet, ConvertListOfObjectsToDataTable(listToOutput));

            adapter.Write(loc);
        }
예제 #5
0
파일: Form1.cs 프로젝트: TomMonks/EasyExcel
 private void button3_Click(object sender, EventArgs e)
 {
     var coord = new ExcelCellCoordinate(5, Convert.ToInt32(this.txtCol.Text));
     Console.WriteLine(coord.ToString());
 }