CarlosAg.ExcelXmlWriter.Workbook book = new CarlosAg.ExcelXmlWriter.Workbook(); // Specify which Sheet should be opened and the size of window by default book.ExcelWorkbook.ActiveSheetIndex = 1; book.ExcelWorkbook.WindowTopX = 100; book.ExcelWorkbook.WindowTopY = 200; book.ExcelWorkbook.WindowHeight = 7000; book.ExcelWorkbook.WindowWidth = 8000; CarlosAg.ExcelXmlWriter.Worksheet sheet = book.Worksheets.Add(strReportName); // Add a Worksheet with Report name sheet.Options.PageSetup.Footer.Data = "Powered by Kinetics" + new String(' ', 30) + "Confidential" + new String(' ', 30) + "Page : &P of &N "; sheet.Options.PageSetup.Layout.Orientation = CarlosAg.ExcelXmlWriter.Orientation.Landscape; sheet.Options.GridLineColor = "#000000"; for (int intColCnt = 0; intColCnt < 125; intColCnt++) // column settings { sheet.Table.Columns.Add(new CarlosAg.ExcelXmlWriter.WorksheetColumn(75)); } CarlosAg.ExcelXmlWriter.WorksheetRow row = sheet.Table.Rows.Add(); CarlosAg.ExcelXmlWriter.WorksheetCell cell3 = row.Cells.Add(""); row = sheet.Table.Rows.Add(); // row.Cells.Add("images\\actions\\BBlogo.gif"); // row.Cells.Add(" "); // row.Cells.Add(" "); string imagepath = Request.PhysicalApplicationPath + "images\\ExertLogo.gif"; book1.addPicture(0, 0, 2, 2, imagepath); row.Cells.Add(new CarlosAg.ExcelXmlWriter.WorksheetCell(strReportName, "Company")); row = sheet.Table.Rows.Add(); CarlosAg.ExcelXmlWriter.WorksheetCell cell = row.Cells.Add(""); row.Cells.Insert(1,new CarlosAg.ExcelXmlWriter.WorksheetCell(imagepath)); // row.Cells.Add(imagepath); // cell.StyleID = "Company"; // cell.MergeAcross = 2; // row.Cells.Add(" "); // row.Cells.Add(" "); row.Cells.Add(new CarlosAg.ExcelXmlWriter.WorksheetCell("Report Run Datetime : " + DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss"), "Reports")); row = sheet.Table.Rows.Add(); // row.Cells.Add(" "); // row.Cells.Add(" "); // row.Cells.Add(" "); CarlosAg.ExcelXmlWriter.WorksheetCell cell2 = row.Cells.Add(); // cell2.StyleID = "Reports"; // cell2.MergeAcross = 2; // cell2.MergeDown = 3; row.Cells.Add(" "); row.Cells.Add(new CarlosAg.ExcelXmlWriter.WorksheetCell("Report Run By : " + Session["strUsername"].ToString(), "Reports")); row = sheet.Table.Rows.Add(); row = sheet.Table.Rows.Add(); row = sheet.Table.Rows.Add();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)