This is the world's most visited unofficial James Bond 007 website with daily updates, news & analysis of all things 007 and an extensive encyclopaedia. Tap into Ian Fleming's spy from Sean Connery to Daniel Craig with our expert online coverage and a rich, colour print magazine dedicated to spies.
SpreadsheetGear allows developers to perform complex spreadsheet tasks without having Excel installed on the machine. Key features include: High-Performance Calculation:
We will expand on the previous example. We need to calculate the "Total" column using a formula, bold the headers, apply currency formatting, and add a border. spreadsheetgear example
public FileResult OnGet() // Open a template that already has your branding and styles SpreadsheetGear.IWorkbook workbook = SpreadsheetGear.Factory.GetWorkbook("template.xlsx"); SpreadsheetGear.IWorksheet worksheet = workbook.Worksheets[0]; // Fill the template with dynamic data IRange dataRange = worksheet.Cells["B2:B5"]; dataRange.Formula = "=RAND() * 1000"; // Dynamic calculation example // Save to a memory stream for the browser System.IO.Stream stream = workbook.SaveToStream(SpreadsheetGear.FileFormat.OpenXMLWorkbook); stream.Seek(0, System.IO.SeekOrigin.Begin); return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "Report.xlsx"); Use code with caution. Source: Live Razor Pages Sample . 3. High-Performance Calculations public FileResult OnGet() // Open a template that
// Column headers worksheet.Cells["A2"].Value = "Product"; worksheet.Cells["B2"].Value = "Units Sold"; worksheet.Cells["C2"].Value = "Revenue"; High-Performance Calculations // Column headers worksheet
No temp files, no Excel on server – just pure .NET streaming.