Access export to excel produces "unreadable data"

A

Andrew Shelley

I have a spreadsheet saved as an Excel 97-2003 workbook and am trying to
export the contents of a query from Access 2007. The exported data is
referenced in about 400 sumif statements in several calculation sheets.

I've tried

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel8, stDocName,
"Output Comparison.xls"

This produces a workbook that produces the error message "Excel found
unreadable content in 'Output Comparison.xls'. If I repair and open the file
the first sheet of formulas has been completely toasted - it's just
unformatted numbers. I've tried specifying several different
acSpreadsheetTypes, all the way from 5 to 8, and even leaving that parameter
blank - but nothing seems to work.

So I also tried

DoCmd.OutputTo acOutputQuery, stDocName, acFormatXLS, "Output
Comparison.xls", True

And this deletes the original workbook and creates a new file containing
just the data that I exported.

This was oh so easy in Access 2003... am I missing something in 2007?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top