Worksheet
A worksheet is a collection of cells organized in rows and columns. The following sections explain how to export worksheets with RadSpreadStreamProcessing.
What Is a Worksheet
A worksheet is a collection of cells organized in rows and columns. It is the working surface you interact with to enter data. Each worksheet contains up to 1048576 rows and 16384 columns and serves as a giant table that allows you to organize information. Typically, a workbook contains several worksheets with related content and only one of the worksheets is active at a time.
IWorksheetExporter Interface
In RadSpreadStreamProcessing, a worksheet can be exported through the IWorksheetExporter interface. This interface defines members that allow you to create and skip rows or columns and merge cells.
Using IWorksheetExporter
You can create a concrete instance of IWorksheetExporter through the CreateWorksheetExporter() method of IWorkbookExporter. Example 1 demonstrates how to add a worksheet to a workbook.
Example 1: Create IWorksheetExporter
using (IWorksheetExporter worksheet = workbook.CreateWorksheetExporter("My sheet"))
{
//Fill the worksheet with data and set the desired properties
}
IWorksheetExporterinherits fromIDisposable. Ensure the object is disposed when you are done with it. Otherwise, the content will not be written in the exported file. The best way to ensure this is handled properly is to wrap it in a using statement.
A worksheet must contain at least one row. Otherwise, an exception is thrown.