Dim xlt As New ExcelTemplate()
xlt.Open(Page.MapPath("./ArrayBindingTemplate2.xls"))
'--- Create an array of names and an array of data
'--- source values and bind the data source to the
'--- template data markers
'--- %%=TwoDimArray.FirstName
'--- %%=TwoDimArray.LastName
'--- %%=TwoDimArray.Position
Dim twoDimNormal(,) As String = New String(,){ _
{"Nancy", "Davolio", "Sales Manager"}, _
{"Michael", "Suyama", "HR Representative"}, _
{"Adrian", "King", "IS Support"}}
Dim names As String() = {"FirstName", "LastName", "Position"}
xlt.BindData(twoDimNormal, _
names, _
"TwoDimArray", _
xlt.CreateDataBindingProperties())
|