2个回答
展开全部
首先要引用EXCELL类( Microsoft Excel 11.0 Object Library)
dim XX as string '这个是你计算出的结果,我以字符类型为例
Dim xltmp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlsheet As Excel.Worksheet
Set xltmp = New Excel.Application
xltmp.Visible = False
Set xlBook = xltmp.Workbooks.Add
Set xlsheet = xlBook.Worksheets(1)
xlBook.Worksheets(1).Cells(5,3) =xx
xlBook.Close True
Set xlsheet = Nothing
Set xlBook = Nothing
xltmp.Quit
Set xltmp = Nothing
dim XX as string '这个是你计算出的结果,我以字符类型为例
Dim xltmp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlsheet As Excel.Worksheet
Set xltmp = New Excel.Application
xltmp.Visible = False
Set xlBook = xltmp.Workbooks.Add
Set xlsheet = xlBook.Worksheets(1)
xlBook.Worksheets(1).Cells(5,3) =xx
xlBook.Close True
Set xlsheet = Nothing
Set xlBook = Nothing
xltmp.Quit
Set xltmp = Nothing
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询