SmartXLS For .NET V2.7.1.7 !!INSTALL!!
Click Here ->>> https://shurll.com/2tuH7h
How to Use SmartXLS for .NET v2.7.1.7 to Create and Manipulate Excel Files in C#
If you are looking for a high-performance .NET component that can write, read, calculate and manipulate Excel compatible files without the need for Microsoft Excel, you should check out SmartXLS for .NET v2.7.1.7. This component is written in 100% managed C# code and supports a wide range of features, such as:
Importing and exporting data from and to DataTables and CSV files
Reading and writing XLSX/XLSM files (Excel 2007-2016 openxml format)
Encrypting and decrypting Excel files (xls and xlsx)
Using templates to create new workbooks based on existing ones
Working with multiple worksheets per file
Formatting cells, fonts, borders, colors, patterns, etc.
Merging and splitting regions
Copying, moving and deleting cells
Setting row height and column width
Using formulas, named ranges and external references
Calculating cells and worksheets
Setting print options, headers, footers and page breaks
Inserting rich text, comments and conditional formatting
Creating and customizing charts and pivot tables
Reading and preserving macros
Supporting Unicode and ASP.NET medium trust level
Running on Mono (Unix/Linux/OsX machines)
In this article, we will show you how to use SmartXLS for .NET v2.7.1.7 to create and manipulate Excel files in C#. You will need to download and install the component from https://smartxls.com/. You can also get a trial version from https://www.nuget.org/packages/OSPSuite.SmartXLS/.
Creating a New Workbook
To create a new workbook, you need to create an instance of the WorkBook class and call the CreateFile method with the file name as a parameter. For example:
using SmartXLS;
...
WorkBook wb = new WorkBook();
wb.CreateFile(\"test.xlsx\");
This will create a new workbook with one worksheet named Sheet1. You can add more worksheets by calling the AddWorkSheet method with the sheet name as a parameter. For example:
wb.AddWorkSheet(\"Sheet2\");
wb.AddWorkSheet(\"Sheet3\");
You can also use an existing workbook as a template by calling the Read method with the template file name as a parameter. For example:
wb.Read(\"template.xlsx\");
Writing Data to Cells
To write data to cells, you need to use the SetCellValue method with the row index, column index and value as parameters. You can write different types of values, such as numbers, strings, dates and booleans. For example:
wb.SetCellValue(0, 0, \"Name\"); //write string
wb.SetCellValue(0, 1, \"Age\"); //write string
wb.SetCellValue(1, 0, \"Alice\"); //write string
wb.SetCellValue(1, 1, 25); //write number
wb.SetCellValue(2, 0, \"Bob\"); //write string
wb.SetCellValue(2, 1, 30); //write number
wb.SetCellValue(3, 0, \"Charlie\"); //write string
wb.SetCellValue(3, 1, true); //write boolean
wb.SetCellValue(4, 0, \"Date\"); //write string
wb.SetCellValue(4, 1, DateTime.Now); //write date
You can also write formulas by using the SetFormula method with the same parameters. The formula should start with an equal sign (=) and use standard Excel syntax. For example: ec8f644aee