可以生成以后,用vba处理下
Dim Book As New XLS.Book(ProjectPath & "Attachments\出库单.xls")
Dim fl As String = ProjectPath & "Reports\出库单.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.Cells
Rg.WrapText = True
'Rg.EntireColumn.AutoFit '自动调整列宽
Rg.EntireRow.AutoFit '自动调整行高
App.Visible = True