Defines extension methods for the Worksheet interface.
You require a license to the DevExpress Office File API or DevExpress Universal Subscription to use these methods in production code. Refer to the DevExpress Subscription page for pricing information.
To enable worksheet extensions, add a reference to the DevExpress.Docs.v19.1.dll assembly and explicitly import the DevExpress.Spreadsheet namespace into the code with the using directive (Imports in Visual Basic).
You can call extension methods in the same way as instance methods of the Worksheet object.
The example below shows how to use the Import extension method to insert data from a list into a worksheet.
A complete sample project is available at https://github.com/DevExpress-Examples/spreadsheet-document-server-api-e4339
Worksheet worksheet = workbook.Worksheets; // Create the List object containing string values. List<string> cities = new List<string>(); cities.Add("New York"); cities.Add("Rome"); cities.Add("Beijing"); cities.Add("Delhi"); // Import the list into the worksheet and insert it vertically, starting with the B6 cell. worksheet.Import(cities, 0, 0, true);
Refer to the Import and Export Data section for more examples on how to use the WorksheetExtensions methods to import data into a worksheet or export data from a worksheet to a data table.