Senin, 02 Juli 2012

[AccessDevelopers] acSpreadsheetTypeExcel produces no data in Access 2007

 

The following code has worked for years:
DoCmd.RunSQL ("DELETE DISTINCTROW JournFinal.* from JournFinal;")
DoCmd.OpenQuery ("Journtblfour")
DoCmd.OpenTable ("journfinal")
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "journfinal", "JournExp"
DoCmd.RunCommand acCmdOutputToExcel
DoCmd.Close acTable, "journfinal"

The system has a table (journfinal)which has data that is then to be put into an Excel spreadsheet called JournExp.

On Access 2007 on Win7 it opens Excel and enters the headers of the columns but does not enter the data. It kranks along and eventually comes up with a message "Microsoft Office Excel is waiting for another application to complete an OLE action."

Yes, references are set to ...depending on machine to Microsoft Office and Access Object Libraries 12 and the acSpreadsheetTypeExcel set for 12 and 12Xml....

Same code running on XP with Access 2003 with acSpreadsheetTypeExcel9 and references set to 11 object libraries gives a 3170 error saying that it is missing an ISAM file. In this instance Excel does not open.

Anyone found the solution? Microsoft, for the 3170 error says make registry changes...but even if you are willing to do that, one does not know the name of the ISAM file and it is not clear that is what is going on on WIN7.

Thanks for your help

__._,_.___
Recent Activity:

Please zip all files prior to uploading to Files section.
.

__,_._,___

Tidak ada komentar:

Posting Komentar