Gembox.spreadsheet.dll
using (var reader = ExcelFile.LoadXlsx("hugefile.xlsx", new XlsxLoadOptions ReadDataOnly = true ))
// Style a header var headerStyle = new CellStyle gembox.spreadsheet.dll
workbook.Save("Report.xlsx"); For truly massive files (500k+ rows), use the LoadOptions to stream data: using (var reader = ExcelFile
// Add data worksheet.Cells[0, 0].Value = "Product"; worksheet.Cells[0, 1].Value = "Qty"; worksheet.Cells[0, 2].Value = "Price"; worksheet.Cells[0, 3].Value = "Total"; using (var reader = ExcelFile.LoadXlsx("hugefile.xlsx"
var worksheet = reader.Worksheets[0]; foreach (var row in worksheet.Rows) // Process row by row without holding entire file in RAM Console.WriteLine(row.Cells[0].Value);
worksheet.Cells[1, 0].Value = "Widget"; worksheet.Cells[1, 1].Value = 10; worksheet.Cells[1, 2].Value = 5.99; worksheet.Cells[1, 3].SetFormula("=B2*C2");
HorizontalAlignment = HorizontalAlignmentStyle.Center, FillPattern = FillPatternStyle.Solid, FillPatternForegroundColor = SpreadsheetColor.FromName(ColorName.DarkBlue), FontColor = SpreadsheetColor.FromName(ColorName.White) ; worksheet.Cells.GetSubrange("A1:D1").Style = headerStyle;