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"); }
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"); }
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"); }