UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Generic Output To Excel Function, Any Version    
 
   
ipisors
post May 28 2013, 11:05 AM
Post#1


Banned
Posts: 9,239
Joined: 21-June 07



Outputting Access to Excel:

This is just a very simple routine I use, nothing fancy. I have frequently needed something that transcended these issues:
ul>
  • sometimes TransferSpreadsheet and OutputTo make the resulting Excel spreadsheet look ugly (worse in older Access versions) and include automatic gray fill
  • formatting in general is not handled with conventional Access methods for outputting queries to Excel
  • I found that I often wanted the same thing: data from a query output to Excel, with NO extra formatting except a bold header row and columns auto-fit
  • I often wanted the worksheet name to be something custom and nicer.
  • Often TransferSpreadsheet and OutputTo will fail if the object (query, table) is not forcibly "opened" first. This especially happens in databases where the object pane is hidden or disabled.
  • While this function is not the fastest running thing in the world, it handles a few basic options. I hope to enhance it as time permits. Any suggestions are welcome. Be gentle, this is my first post in a code contribution section and it may qualify as the "simplest code ever posted" (is there a prize for that ??) But so many people in Access seem to need a handier output to Excel. Something simple to code that ends up looking better.
    The attachment is a zipped .BAS file (simple text) and has been tested in Access 2003. Should be fine for Access 2007 & 2010.
    Attached File(s)
    Attached File  modQueryOutput.zip ( 1.59K )Number of downloads: 264
     
    Go to the top of the page
     


    Custom Search
    RSSSearch   Top   Lo-Fi    11th December 2017 - 03:43 PM