.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
A newer version of this page is available. Switch to the current version.

WorksheetExtensions Class

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.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Docs.v19.1.dll


public static class WorksheetExtensions


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.

Worksheet worksheet = workbook.Worksheets[0];
// Create the List object containing string values.
List<string> cities = new List<string>();
cities.Add("New York");

// 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.


See Also