datagrid输出到Excel2003?
在OFFICE 2000下运行很好的程序,因为升级到了OFFICE2003(SP1)而无法执行,似乎是找不到运行库.则将引用类型更改为Microsoft Office 11.0 Object Library和Microsoft Excel 11.0 Object Library.
在部分机器上可以运行,但仍然有些英文操作系统的机器报错.
郁闷...有遇到过这个问题的兄弟吗?
实际程序大致如下
Dim xlApp As Object
Dim xlBook As Object
Dim xlSheet As Object
'Start a new workbook in Excel.
xlApp = CreateObject("Excel.Application")
'xlBook = xlApp.Workbooks.Add
xlBook = xlApp.Workbooks().Add
xlSheet = xlBook.Worksheets("sheet1")
xlApp.Visible = True
xlSheet = xlBook.Worksheets(1)
'Add data to cells of the first worksheet in the new workbook.
.....