utilizing SpreadsheetGear; structure Program static void Main(string[] args) // Create a new workbook IWorkbook workbook = SpreadsheetGear.Factory.GetWorkbook(); // Get the first worksheet IWorksheet worksheet = workbook.Worksheets[0]; // Set the values of some cells worksheet.Cells["A1"].Value = 10; worksheet.Cells["B1"].Value = 20; // Set a formula for a cell worksheet.Cells["C1"].Formula = "=A1+B1"; // Calculate the formula worksheet.Calculate(); // Get the result of the formula object result = worksheet.Cells["C1"].Value; // Save the workbook to a file workbook.SaveTo("example.xlsx");
SpreadsheetGear Sample: An Exhaustive Guide to Accessing Robust Spreadsheet Capabilities SpreadsheetGear serves as an powerful .NET framework library that allows developers to generate, read, write, and manipulate Excel files in their apps. Featuring the robust capabilities plus intuitive application programming interface, SpreadsheetGear serves as a perfect choice for developers who need to work with Excel files in their .NET applications. This article, we explore one SpreadsheetGear example thatshowingillustrates how to use the library to perform common spreadsheet tasks. What is SpreadsheetGear? SpreadsheetGear acts as a .NET software library which delivers an extensive collection of tools for managing Excel workbooks. Developers can generate, read, save, and edit Excel files (.xls, .xlsx, .xlsm, .xltx, .xltm) within .NET apps. Using SpreadsheetGear, developers can carry out numerous tasks, such as:
SpreadsheetGear Example: Performing Calculations and Formulas In this example, we’ll create a simple spreadsheet that performs calculations and formulas.