老师您好
excel模板中设置了格式,在L14输入指定值后,其它10几个单元格的值跟着会变,
模板生成细节区后这个设置就没用了,所以我想在模板生成前,向模板L14写入指定值。请问要怎样改代码?
Dim name As String = Tables("Dd").Current("款号")
Dim na As String = Date.Today & name & ".xlsx"
Dim tmp As String = ProjectPath & "Attachments\制单.xlsx" '定义模板路径
Dim rpt As String = ProjectPath & "Reports\" & na '定义保存路径
Dim Book As New XLS.Book(tmp) ''打开模板
Book.Build() '生成细节区
Book.Save(rpt) '保存工作簿
Dim Proc As New Process '打开工作簿
Proc.File = rpt
Proc.Start()
此主题相关图片如下:qq截图20170527161027.jpg