筛选本月数据参考:
http://www.foxtable.com/webhelp/topics/2720.htm
大概:
Dim y As Integer = Date.Today.Year
Dim m As Integer = Date.Today.Month
Dim dt1 As New Date(y, m, 1)
Dim dt2 As New Date(y, m, Date.DaysInMonth(y, m)) '获取本月的最后一天
Dim Filter As String
Filter = "日期 >= #" & dt1 & "# And 日期 <= #" & dt2 & "#"
Dim ex as New Exporter
ex.SourceTableName = "订单" '指定导出表
ex.FilePath = "c:\Data\订单.xls" '指定目标文件
ex.Format = "Excel" '导出格式为Excel
ex.Filter = Filter '指定导出条件
ex.Export() '开始导出