IXlRow.BlankCells(Int32, XlCellFormatting) Method

Creates the specified number of empty cells to which specific formatting options are applied.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v21.1.Core.dll


void BlankCells(
    int count,
    XlCellFormatting formatting


Name Type Description
count Int32

A positive integer that specifies the number of blank cells to be created.

formatting XlCellFormatting

An XlCellFormatting object that specifies formatting settings to be applied to the created cells.

If formatting is null, a System.ArgumentNullException exception occurs.


The example below demonstrates how to use the IXlRow.BlankCells method to quickly generate multiple empty cells in a row that share the same formatting settings. Note that you can also use the IXlRow.BulkCells method to create row cells with the specified values and format characteristics.

For more information on how to create and format cells in a worksheet, see the Cells and Formatting example sections.

// Create a worksheet. 
using (IXlSheet sheet = document.CreateSheet())
    // Create the first row in the worksheet.                      
    using (IXlRow row = sheet.CreateRow())
        // Create five successive cells in the row and set their background color to light blue.
        row.BlankCells(5, XlFill.SolidFill(Color.LightBlue));
See Also