Ejemplo n.º 1
0
        public void TestManyData()
        {
            var excelReport = new ExcelReport("Test many data", "Unknown", "sheet 1");

            excelReport.AddEmptyRows(5);
            excelReport.AddLogo(0, 0);

            for (int rowIndex = 1; rowIndex < 30000; rowIndex++)
            {
                for (int columnIndex = 1; columnIndex < 20; columnIndex++)
                {
                    excelReport.AddCell(rowIndex * columnIndex, columnIndex, rowIndex, TextStyle.NormalText);
                }
            }

            excelReport.SaveToExcelFile(@"c:\\TestManyData.xls");
        }
Ejemplo n.º 2
0
        public void TestManyDataWithBorder()
        {
            var excelReport = new ExcelReport("Test many data with border", "Unknown", "sheet 1");

            excelReport.AddEmptyRows(5);
            excelReport.AddLogo(0, 0);

            for (int rowIndex = 1; rowIndex < 30000; rowIndex++)
            {
                var row = excelReport.GetNextRow();
                for (int columnIndex = 1; columnIndex < 20; columnIndex++)
                {
                    excelReport.AddCell(rowIndex * columnIndex, columnIndex, row, TextStyle.NormalText, HSSFColor.WHITE.index, CellBorderType.THIN, HSSFColor.BLACK.index);
                }
            }

            excelReport.SaveToExcelFile(@"c:\\TestManyDataWithBorder.xls");
        }
Ejemplo n.º 3
0
        public void TestCellAdd2()
        {
            var excelReport = new ExcelReport("Test many data", "Unknown", "sheet 1");

            excelReport.AddEmptyRows(5);
            excelReport.AddLogo(0, 0);

            for (int rowIndex = 1; rowIndex < 30000; rowIndex++)
            {
                //var row = excelReport.GetNextRow();
                for (int columnIndex = 1; columnIndex < 20; columnIndex++)
                {
                    //excelReport.AddCell(rowIndex * columnIndex, columnIndex, row, TextStyle.NormalText);
                    excelReport.AddCell("test " + columnIndex + rowIndex, columnIndex, rowIndex, TextStyle.NormalText, HSSFColor.WHITE.index, CellBorderType.NONE, HSSFColor.WHITE.index);
                }
            }

            excelReport.SaveToExcelFile(@"c:\\TestCellAdd2.xls");
        }