以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- MSExcel.Application速度慢,怎么可以加快? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=142149) |
-- 作者:z769036165 -- 发布时间:2019/10/19 18:30:00 -- MSExcel.Application速度慢,怎么可以加快? Dim Book As New XLS.Book(ProjectPath & "Attachments\\汇总.xls") Dim fl As String = ProjectPath & "Reports\\汇总.xls" Dim Sheet As XLS.Sheet = Book.Sheets(0) \'引用工作簿的第一个工作表 Book.Build() \'生成细节区 Book.Save(fl) \'保存工作簿 Dim App As New MSExcel.Application Dim Wb As MSExcel.WorkBook =App.WorkBooks.Open(fl) Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1) Dim Rg As MSExcel.Range = Ws.UsedRange rg.Formula = rg.Formula Rg.WrapText = True \'Rg.EntireColumn.AutoFit \'自动调整列宽 Rg.EntireRow.AutoFit \'自动调整行高 app.visible = True Wb.Save App.Quit Dim Book1 As New XLS.Book(fl) book.PreBuild = False e.WriteBook(book,"汇总.xls",False) httprequest中实现网页下载,能成功出现文件下载,就是反应很慢要3~5秒才出来,问题出现在MSExcel.Application打开进行自动调整行高上面,请问这块有什么办法可以优化吗? |
-- 作者:有点酸 -- 发布时间:2019/10/19 22:47:00 -- excel的速度问题,foxtable没办法优化 |