1、生成报表,打开报表,设置自动行高;
Dim Book As New XLS.Book(ProjectPath & "Attachments\123.xls")
Dim Sheet As XLS.Sheet = Book.Sheets(0) '引用工作簿的第一个工作表
Dim fl As String = ProjectPath & "Reports\123.xls"
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
2、下载报表。