我尝试通过Open XML将数据从我的数据库导出到powerpoint我在第一张幻灯片中创建了一个表,但问题是当我有大量数据时。当第一张幻灯片充满数据时,如何创建新幻灯片? 我没有找到任何迹象表明如何获得表格的高度以生成新幻灯片 任何的想法?请...
Private Shared Function GenerateTable() As A.Table
Dim tableSources As String(,) = New String(,) {{"name", "age", "gg", "hhha"}, {"Tom", "25", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "aaa"}, {"Tom", "25", "aaa", "aaa"}, {"Tom", "25", "aaa", ""}, {"Tom", "25", "", ""}, {"Tom", "25", "aaa", "aaa"}, {"Tom", "25", "ee", "www"}}
Dim table As New A.Table()
Dim tableProperties As New A.TableProperties() With { _
.FirstRow = True, _
.BandRow = True _
}
Dim tableStyleId As New A.TableStyleId()
tableStyleId.Text = "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}"
tableProperties.Append(tableStyleId)
Dim tableGrid1 As New A.TableGrid()
Dim gridColumn1 As New A.GridColumn() With { _
.Width = 2048000L _
}
Dim gridColumn2 As New A.GridColumn() With { _
.Width = 2048000L _
}
Dim gridColumn3 As New A.GridColumn() With { _
.Width = 2048000L _
}
Dim gridColumn4 As New A.GridColumn() With { _
.Width = 2048000L _
}
tableGrid1.Append(gridColumn1)
tableGrid1.Append(gridColumn2)
tableGrid1.Append(gridColumn3)
tableGrid1.Append(gridColumn4)
table.Append(tableProperties)
table.Append(tableGrid1)
For row As Integer = 0 To tableSources.GetLength(0) - 1
Dim tableRow As New A.TableRow() With { _
.Height = 570840L _
}
For column As Integer = 0 To 3
tableRow.Append(CreateTextCell(tableSources.GetValue(row, column).ToString()))
Next
table.Append(tableRow)
Next
Return table
End Function