aspose.cells sheet
时间: 2023-07-28 11:14:19 浏览: 122
Aspose.Cells
Aspose.Cells is a .NET component that allows developers to create, modify, convert, and render Microsoft Excel spreadsheets without requiring Microsoft Office or Excel to be installed on the system.
Regarding sheets, Aspose.Cells provides a Sheet class that represents a worksheet in an Excel workbook. Developers can use this class to perform various operations on a worksheet, such as adding, deleting, or renaming sheets, hiding or showing sheets, setting sheet properties, and more.
Here's an example of creating a new sheet with Aspose.Cells:
```
// Instantiate a new workbook
Workbook workbook = new Workbook();
// Add a new sheet to the workbook
Worksheet worksheet = workbook.Worksheets.Add("My Sheet");
// Set some cell values on the sheet
worksheet.Cells["A1"].PutValue("Hello");
worksheet.Cells["B1"].PutValue("World");
// Save the workbook to a file
workbook.Save("MyWorkbook.xlsx");
```
In this example, we create a new workbook, add a new sheet named "My Sheet" to it, set some cell values on the sheet, and save the workbook to a file.
阅读全文