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 whether the data being bound to a template file should be transposed before being bound to the template using the ExcelTemplate.BindData method.

Signature
C#
C#
 public boolean Transpose{ get; set; }
Signature
vb.net
vb.net
Public Property Transpose() As Boolean
Remarks

If this property is set to true, the rows and columns of the data source will be flipped so that the first row of data is inserted in the first column, the second row of data into the second column, and so on. The default value for this property is false.

Transpose is a Read/Write property.

Example
Code Block
csharp
csharp
titleC#

          DataBindingProperties dbp = xlt.CreateDataBindingProperties();
          dbp.Transpose = true;
          xlt.BindData(twodim, names, "TwoDimArray", dbp);
          xlt.Save(Page.Response, "output.xls", false);
        
Code Block
vb.net
vb.net
titlevb.net

          Dim dbp As DataBindingProperties = xlt.CreateDataBindingProperties()
          dbp.Transpose = False
          xlt.BindData(twodim, names, "TwoDimArray", dbp)
          xlt.Save(Page.Response, "output.xls", False)