|
此文章由 NoChoice 原创或转贴,不代表本站立场和观点,版权归 oursteps.com.au 和作者 NoChoice 所有!转贴必须注明作者、出处和本声明,并保持内容完整
本帖最后由 NoChoice 于 2014-8-31 10:19 编辑
俏君 发表于 2014-8-31 09:43 
阿姨想学点东西防止老年痴呆, 准备发邮件直接问老师了。
再给加点分
stackoverflow已经给你例子,
http://stackoverflow.com/questio ... t-in-same-directory
打开access,按alt+f11, 然后copy&paste,改改就行了
You can use VBA to export an Access database table as a Worksheet in an Excel Workbook.
To obtain the path of the Access database, use the CurrentProject.Path property.
To name the Excel Workbook file with the current date, use the Format(Date, "yyyyMMdd") method.
Finally, to export the table as a Worksheet, use the DoCmd.TransferSpreadsheet method.- Dim outputFileName As String
- outputFileName = CurrentProject.Path & "\Export_" & Format(Date, "yyyyMMdd") & ".xls"
- DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Table1", outputFileName , True
- DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Table2", outputFileName , True
复制代码 |
评分
-
查看全部评分
|