谢谢:这2个代码可以做到自动换下一行。
1、做一個按扭:
Dim Book As New XLS.Book("c:\book5.xls")
For i as integer = 1 to 4
Book.Marks.Add("標記" & i,"")
next
Book.Build()
Book.Save("c:\reports\test.xls")
Dim Proc As New Process
Proc.File = "c:\reports\test.xls"
Proc.Start()
2、報表事件BuildDetail:excel模板要改一下 [修理内容] 改成 <修理内容>
Select Case e.Book.TempLate
Case "book5"
If e.DataRow IsNot Nothing AndAlso e.DataRow.Isnull("修理內容") = False Then
e.Book.Marks("修理內容") = e.DataRow("修理內容").Replace(",", vbcrlf)
End If
End Select
[此贴子已经被作者于2014-3-8 9:44:04编辑过]