G
Guest
I used the following code to create a workbook and save it in a
webapplication.
dim oExcel As Excel.ApplicationClass
dim oBook As Excel.WorkbookClass
dim obooks As Excel.Workbooks
dim designb As Excel.Workbook
dim osheets As Excel.Sheets
dim result as string
result = "c:\result.xls"
oExcel = CreateObject("Excel.Application")
oExcel.Visible = True
obooks = oExcel.Workbooks
designb = obooks.Open(result)
osheets = designb.Worksheets
.........
designb.save
However, it seems it takes forever to save it.
I tried another method as following, but with the same result.
designb.Close(savechanges:=True)
When I used designb.saveas(path), path is a new directory, it works
fine. I needs to save the file to the same location. Please let me know
what I need to do. Thanks a lot.
webapplication.
dim oExcel As Excel.ApplicationClass
dim oBook As Excel.WorkbookClass
dim obooks As Excel.Workbooks
dim designb As Excel.Workbook
dim osheets As Excel.Sheets
dim result as string
result = "c:\result.xls"
oExcel = CreateObject("Excel.Application")
oExcel.Visible = True
obooks = oExcel.Workbooks
designb = obooks.Open(result)
osheets = designb.Worksheets
.........
designb.save
However, it seems it takes forever to save it.
I tried another method as following, but with the same result.
designb.Close(savechanges:=True)
When I used designb.saveas(path), path is a new directory, it works
fine. I needs to save the file to the same location. Please let me know
what I need to do. Thanks a lot.