好像都生成不了了。不明白什么意思 。
我用XLS直接生成文件,可以。正常。只是PDF预览不成生。
Dim Book As New XLS.Book(ProjectPath & "Attachments\主材选型确认表.xls")
Dim str As String =Tables("材料选型").Current("合同名称")
If str <> "" Then
Dim dlg As New SaveFileDialog '定义一个新的SaveFileDialog
dlg.Filter= "Excel文件|*.xls" '设置筛选器
dlg.FileName=str & "-" &Forms("材料选型").Name
If dlg.ShowDialog = DialogResult.Ok Then
Book.Build() '生成细节区
Book.Save(dlg.FileName)
Dim Proc As New Process
Proc.File = dlg.FileName
Proc.Start()
End If
Else
MessageBox.show("请选择要生成的'材料选型'表的订单!")
End If
我是OFFICE 2007 但是已经安装 了,转PDF插件的。
[此贴子已经被作者于2016/9/16 15:24:02编辑过]