Avatar of Ian Wallace
Ian Wallace

asked on 

Writing data from Access to Excel produces a blank document


I have a reporting package which is written in MS Access.

Some of the reports need to be produced in Excel, so the Access database grabs the data it needs from SQL and then write the Excel document (They are all a bit quirky and have to be formatted a certain way so a DoCmd.OutPutTo won't work).

Some users are having issues where the document is created, the headers are there, the column headers are there, the page formatting has been done, but theres no data!  Some of them can close the Access database, reopen it and then it will work, but others haven't been able to create these reports for weeks.

I've made sure they are all on the same versions of Windows and Office so am now stuck.

Any help would be appreciated!
Microsoft AccessVBAMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Using automation to open and manipulate Excel can be a challenge.
Can you provide the code you are using to write to the Excel file?
Just as importantly, when you finish writing to Excel, you need to make sure that you have cleared out all of the objects you may have created (ranges, sheets, workbooks, Excel) during your process.  Failure to do so will generally result in rogue instances of Excel being open but only visible in the task manager.

Avatar of byundt
Flag of United States of America image

Blurred text
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Microsoft Access
Microsoft Access

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.

Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews


IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo