生成报表以后,运行此代码
Dim App As New MSExcel.ApplicationDim Wb As MSExcel.WorkBook = App.WorkBooks.Open("D:\Report.xls")Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)Dim Rg As MSExcel.Range = Ws.Cells'Rg.EntireColumn.AutoFit '自动调整列宽
Rg.WrapText = True Rg.EntireRow.AutoFit '自动调整行高App.Visible = True