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
Wiki Markup
{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.  
{excerpt}
{signature:C#}
 public boolean Transpose{ get; set; }
{signature}{signature:vb.net}
Public Property Transpose() As Boolean
{signature}
{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|DataBindingProperties.Transpose] is a *Read/Write* property.

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

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

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

{example}