Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Description

Excerpt

Sets or returns the maximum number of rows to be bound to the template file when the ExcelTemplate.BindData or ExcelTemplate.BindColumnData methods are called.

Signature
C#
C#
 public int MaxRows{ get; set; }
{signature}{signature:
}
Signature
vb.net
vb.net
Public Property MaxRows() As Integer
{signature}
{remarks}
Any rows in the data source after the [MaxRows|DataBindingProperties.MaxRows] value will not be added to the template.

{{MaxRows}} is a *Read/Write* property.

{remarks}
{example}{code:csharp|title=C#}
Remarks

Any rows in the data source after the MaxRows value will not be added to the template.

MaxRows is a Read/Write property.

Example
Code Block
csharp
csharp
titleC#


          DataBindingProperties dbp = xlt.CreateDataBindingProperties();
          dbp.MaxRows = 20;
          xlt.BindData(twodim, names, "TwoDimArray", dbp);
          xlt.Save(Page.Response, "output.xls", false);
        
{code} {code:
Code Block
vb.net
|title=
vb.net
titlevb.net
}


          Dim dbp As DataBindingProperties = xlt.CreateDataBindingProperties()
          dbp.MaxRows = 20
          xlt.BindData(twodim, names, "TwoDimArray", dbp)
          xlt.Save(Page.Response, "output.xls", False)
        
{code} {example}