帮助里面有如下一段代码:
Dim
Book
As
New
XLS.Book(ProjectPath
&
"Attachments\出库单.xls")
Dim
fl
As
String =
ProjectPath
&
"Reports\出库单.xls"
book.AddDataTable("出库","数据源名称","S*elect
* from {出库} where 出库单编号= 'CK-20030726001'")
'添加父表
book.AddDataTable("出库明细","数据源名称","S*elect
* from {出库明细} where 出库单编号= 'CK-20030726001'")
'添加子表
book.AddRelation("出库","出库单编号","出库明细","出库单编号")
'建立关联
Book.Build()
'生成细节区
Book.Save(fl)
'保存工作簿
Dim
Proc
As
New
Process
'打开工作簿
Proc.File
= fl
Proc.Start()
实在搞不明白"数据源名称"是指哪个数据源?望老师指点。