The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Row

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.2.dll

Declaration

public static class WorksheetExtensions
Public Module WorksheetExtensions
public static class WorksheetExtensions
Public Module WorksheetExtensions
public static class WorksheetExtensions
Public Module WorksheetExtensions

Remarks

To enable worksheet extensions, add a reference to the DevExpress.Docs.v19.2.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");
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.

Inheritance

Object
WorksheetExtensions
See Also