View Full Version : Exporting a query to Excel in a specific formatted way?


NoobParadox
01-10-2010, 08:38 AM
Say I had a view, "Production numbers," that outputs something like

Production Level
10
300
400
600

And I want to make a module that will export this view to an excel file with some extra formatting (say, adding a border or color or adding a =SUM(everything above). I could do this easily in pure VBA, but I am wondering how you'd essentially export the view from Access to VBA while also implementing some cell-data manipulation at the end product. Thanks!

Brianwarnock
01-10-2010, 08:40 AM
Did you just delete a thread that I was in the process of replying to?
Do you make a habit of deleting your threads?

Brian

NoobParadox
01-10-2010, 08:43 AM
Yes, I delete them when I've gotten it all working (I know I ask a lot of questions and I try not to clutter things up if I can help it) -- my apologies.

I've got the reports outputting correctly. Turns out the Wizard wasn't even adding any open command even though I had told it to!

Brianwarnock
01-10-2010, 08:49 AM
One of the purposes of the forum is that people can and should search it to see if their question has already been answered, therefore all threads should remain on the forum.

In addition members who may have posted to your thread many times will lose the count of those posts and this may adversly affect their ability to do various things.

brian

NoobParadox
01-10-2010, 08:57 AM
EDIT: So far I've got it outputting the view to an excel file in the same directory. Just need to figure out formatting cells.

NoobParadox
01-10-2010, 09:18 AM
EDIT:

Got everything working... but if I run it twice, it errors out because Excel is open, even if I tell it to close. Frustrating.