Formatting the resulting Excel file?

  • Thread starter Thread starter Phil Smith
  • Start date Start date
P

Phil Smith

I have a few queries I am sending to a Excel orkbook. I am hoping to
automate this daily, for publication to the web.

What is the easiest way to to end up with formatted results? Nothing
fancy, just headings bolded, and idealy freeze panes, on several
worksheets. I can think of a couple of ways, just looking for the
easiest, most reliable way to pull this off.

Thanx

Phil
 
Assuming that the data in the spreadsheet are contiguous cells, your options
would be

1) Export the data directly into an already formatted EXCEL file template
using TransferSpreadsheet action (macro or VBA) from ACCESS.

2) Write the data directly into an already formatted EXCEL file template
using a Recordset from ACCESS.

3) Export the data directly into an EXCEL file using TransferSpreadsheet
action (macro or VBA) from ACCESS, and then use Automation to explicitly
format the generated EXCEL file.

3) Write the data directly into an already formatted EXCEL file template
using a Recordset from ACCESS, and then use Automation to explicitly format
the generated EXCEL file.

See the articles at this website for examples:
http://www.accessmvp.com/KDSnell/EXCEL_ImpExp.htm
 
I like the sound of option 1. How do I do this? I know how to
transferspreadsheet, but that creates a new tab in an existing
worksheet, which would of course have no formatting. I assume the
"Range" option is the key to this, but am not sure. Create my template
workbook, format and name a range of cells, then transferspreadhseet
into that range? If it is that easy, you just made my month!
 
Don't even need a range name, just name the tab the same as the queery I
am transferring. Works perfectly.

Thank you very much.
 
Back
Top