Link to home
Start Free TrialLog in
Avatar of ttist25
ttist25

asked on

Export to Excel From Access - File Error. Number Formats Lost

Hello.

I'm using a macro to export data from an Access query to Excel.  It works fine but when I open the Excel File I get a dialog that says "File Error.  Some number formats may have been lost."

If I click OK everything looks as it should but this is an annoyance I'd like to do away with.  I've tried saving to .xls and .xlsx with no difference.

Any Ideas how I can fix this (from within Access preferably)?  

Thanks!
SOLUTION
Avatar of Richard Daneke
Richard Daneke
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Which Macro action do you use to create the Excel file?   Are you using a template?
Yes, and also post a sample of the resulting Excel file.

Sometimes these warnings are precautionary...
...and not really indicative of any real issue with the file
Avatar of ttist25
ttist25

ASKER

Sorry - I'm using Access and Excel 2007.  I have tried saving to xls or xlsx with the same result.  

The macro I'm using has the following properties:
Object type: Query
ObjectName: MyQueryName
Output Format: Excel 97 - Excel 2003 Workbook (*.xls)
AutoStart: yes
OutputQuality: Screen

I am not using a template.  And you are correct, there's nothing wrong with the data in the file but I'd like to not have the dialog box pop up.  It makes it look broken :)

Thanks for your help!
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ttist25

ASKER

Hi HE

That is what I'm dealing with and I had looked at that solution before posting.  I was hoping for something more graceful but I'm not finding much.  

Any other ideas?
So will you be posting a sample file as I requested?
Yes or no?
Avatar of ttist25

ASKER

Hi Boag,

Thanks for your offer to help.  I don't want to seem ungrateful but, I'm concerned about posting the file.  I hope you understand.  

Is there something specific you would be looking for that I might be able to check?

All we would need is a file that generates the same error.

So you can use the same file and obfuscate the data...
Or create a junk table and query and export that...

...as long as it generates the same error when opened in Excel...
Avatar of ttist25

ASKER

Hi guys,

I've been trying to get a file that will do the same thing but as soon as I change it to obfuscate the data it stops throwing the error.  It's kind of strange.  If I crate the Excel file from the macro in Access it opens up and I get the error.  If I close the spreadsheet and then open it back up again, I get the same error.  

But, if I click the save button in Excel without modifying any of the data and then open it back up again I don't get the error.  
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ttist25

ASKER

Thanks guys.  Sorry for taking so long to close this.  It wasn't really resolved but HelloEverbody's solution would likely have fixed it.