Minggu, 04 Februari 2018

Re: [MS_AccessPros] CSV export not working

 

You are correct to think of the Excel upgrade

All Microsoft Office apps made a significant change in file format between Office 2003 and Office 2007.

For the most part, newer software can read older format files. The exception is Access after 2010 cannot read Access 2003 format.

You may be able to save your destination Excel file in the 2003 format. Excel 2016 as installed will save everything in the newer format, which is causing your problem.

Plan B would be to export to an unfomatted CSV file.

Gary

At 11:18 PM 2/4/2018, you wrote:

I am using Access 2003 and use the following code to export to an Excel file. This code used to work fine, but no longer works.'DoCmd.TransferSpreadsheet acExport' gives me : run-time error '3274' external table is not in the expected format.

MyDocsPath = Environ$("USERPROFILE") & "\" & "My Documents\"

DoCmd.OutputTo acOutputQuery, "MLTC1b_Detail", acFormatXLS, MyDocsPath & "MLTC Summary" & Format([Forms]![mltc1]![pid from], "yyyymmdd") & ".csv", False

DoCmd.TransferSpreadsheet acExport, 8, "mltc1b_Day_summary", MyDocsPath & "MLTC Summary" & Format([Forms]![mltc1]![pid from], "yyyymmdd") & ".csv", False

DoCmd.TransferSpreadsheet acExport, 8, "mltc1b_Registrant_summary", MyDocsPath & "MLTC Summary" & Format([Forms]![mltc1]![pid from], "yyyymmdd") & ".csv", True


Maybe it is because I installed Excel 2016,  Excel 2003 is also installed in this computer. I tried changing 'acExport, 8,' to 'acExport, 9,'  and 'acExport, 10,'. I get the same error.


--------------------------------------------------------
Gary D. Schwartz          Please reply to: gary.schwartz@pobox.com

__._,_.___

Posted by: "Gary D. Schwartz" <gary.schwartz@pobox.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar