Format Excel From Access

  • Thread starter Thread starter Arlan
  • Start date Start date
A

Arlan

Does anyone have any sample code that will point me in the right
direction in regards to formatting Excel spreadsheets from Access code.
(Borders, Font, Sums, etc...)

My current process is to set-up an excel spreadsheet with the report
name, column heading etc.. I then copy a recordset to the excel file,
and then save it as a report, generally with the date in the file name.


If the record set that I copy has the same number of records each time,
I can do all of the formatting in the Excel "template". My problem, is
I am now getting into more advanced reporting where the records sets
have varying number of recrods, so I cannot pre-format the excel
"template", I need to do it on the fly.


Any help is appreciated. Thanks
 
Actually, you may want to look for an EXCEL newsgroup. It is possible in
Access to manipulate an EXCEL workbook. Regardless of which App your
doing it from (ACCESS or EXCEL) the core coding is essentially the same.
There will be some differences, but starting out from within EXCEL VBA
will be a good place to learn the EXCEL basics. Once you've got them
down, then its just a matter of dealing with the nuances of controling
EXCEL from ACCESS. I can snoop around for some sample code to give you a
feel of what your looking for since I've had to do it before.

If you do post this in an EXCEL newsgroup, the specific information that
you're looking for is how to use EXCEL VBA to maniputate a workbook &
worksheets. Also, be certain to check out the EXCEL VBA reference and
the EXCEL object model.

David H
 
Back
Top