如何把MSHFlexGrid里的数据导出至Excel
3个回答
展开全部
dim ExcelApp As Excel.Application
Set ExcelApp = GetObject(, "Excel.Application")
dim i as Integer
dim j as Integer
With MSHFlexGrid1 '将MSHFlexGrid1中内容写到EXCEL表格中
For i = 0 To .Rows - 1
For J = 0 To .Cols - 1
DoEvents
ExcelApp.ActiveSheet.Cells(i + 1, J + 1) = .TextMatrix(i, J)
Next J
Next i
End With
Set ExcelApp = GetObject(, "Excel.Application")
dim i as Integer
dim j as Integer
With MSHFlexGrid1 '将MSHFlexGrid1中内容写到EXCEL表格中
For i = 0 To .Rows - 1
For J = 0 To .Cols - 1
DoEvents
ExcelApp.ActiveSheet.Cells(i + 1, J + 1) = .TextMatrix(i, J)
Next J
Next i
End With
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
dim ExcelApp As Excel.Application
Set ExcelApp = GetObject(, "Excel.Application")
dim i as Integer
dim j as Integer
With MSHFlexGrid1 '将MSHFlexGrid1中内容写到EXCEL表格中
For i = 0 To .Rows - 1
For J = 0 To .Cols - 1
DoEvents
ExcelApp.ActiveSheet.Cells(i + 1, J + 1) = .TextMatrix(i, J)
Next J
Next i
End With
Set ExcelApp = GetObject(, "Excel.Application")
dim i as Integer
dim j as Integer
With MSHFlexGrid1 '将MSHFlexGrid1中内容写到EXCEL表格中
For i = 0 To .Rows - 1
For J = 0 To .Cols - 1
DoEvents
ExcelApp.ActiveSheet.Cells(i + 1, J + 1) = .TextMatrix(i, J)
Next J
Next i
End With
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
vb的?导出excel代码提供
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询