以下公式为将绩效计划表中的可见列导出EXCEL,但每次导出都是所有行,希望只导出当前显示的行(不包括隐藏行),请问应该加什么公式?谢谢
Dim flds As String
For Each c As Col In Tables("绩效计划表").Cols
If C.Visible Then
flds = flds & "," & c.name
End If
Next
flds= flds.Trim(",")
Dim dlg As New SaveFileDialog '定义一个新的SaveFileDialog
dlg.Filter= "Excel文件|*.xls" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Dim ex As New Exporter
ex.SourceTableName = "绩效计划表" '指定导出表
ex.FilePath = dlg.FileName '指定目标文件
ex.Format = "Excel" '导出格式为Excel
ex.Fields = flds '指定导出字段
ex.Export() '开始导出