xlSheet.Rows(1).RowHeight = 40
xlSheet.Range(xlSheet.Cells(1, 1), xlSheet.Cells(1, 10)).MergeCells = True
xlSheet.Cells(1, 1).Value = "工程量汇总"
xlSheet.Cells(1, 1).Font.Size = 14
xlSheet.Cells(1, 1).Font.Bold = True
With Grid '/*设置列宽
For j = 0 To .cols - 1
xlSheet.Columns(j + 1).ColumnWidth = .ColWidth(j) / 140
Next j
For i = 1 To .Rows - 1
For j = 0 To .cols - 1
xlSheet.Cells(i + 1, j + 1).Value = "'" & .TextMatrix(i, j)
Next j
Next i
End Withgrid是msflexgrid如何把整张表的数据都存在execl里,现在的问题是grid的表头没有了。
xlSheet.Range(xlSheet.Cells(1, 1), xlSheet.Cells(1, 10)).MergeCells = True
xlSheet.Cells(1, 1).Value = "工程量汇总"
xlSheet.Cells(1, 1).Font.Size = 14
xlSheet.Cells(1, 1).Font.Bold = True
With Grid '/*设置列宽
For j = 0 To .cols - 1
xlSheet.Columns(j + 1).ColumnWidth = .ColWidth(j) / 140
Next j
For i = 1 To .Rows - 1
For j = 0 To .cols - 1
xlSheet.Cells(i + 1, j + 1).Value = "'" & .TextMatrix(i, j)
Next j
Next i
End Withgrid是msflexgrid如何把整张表的数据都存在execl里,现在的问题是grid的表头没有了。
For j = 0 To .cols - 1
xlSheet.Cells(i + 2, j + 1).Value = "'" & .TextMatrix(i, j)
Next j
Next i