msAccess Report Header export to Excel

S

slickdock

I have no excel skills, only msAccess. I can successfully automate the
exporting of my access report to excel using a macro's OutputTo command,
output format excel.

The header is the problem. I want my excel header to look like my multi line
access report header. Instead it breaks each object up into 1 line of
continuous cells.

It should look like this:

Left Aligned Date: 6/5/09 My Centered Report Title
Left Aligned Check No.: 154 My Centered Company Name

Thank you.
 
J

Joel

The issue may only be formating. try highlighting row 1 of the spreadsheet.
the go to worksheet menu format - cells - alignment - Wrap Text.
 
S

slickdock

That didn't work. Also, maybe I should have been clear to say I don't want
the user to have to do anything in excel; I would like to automate the
process so the worksheet comes over with no more formatting needs.
 
J

Joel

How good are you with VBA programming in ACCESS. the excel portion of the
code isn't too complicated.

You can run this macro from access. Yo can get each row of data from the
access database and write the data to the workbook



Sub OpenExcel()

Set excelobj = CreateObject("Excel.application")
excelobj.Application.Visible = True
With excelobj
Set bk = excelobj.workbooks.Add
With .sheets(1)
'write header row
.Range("A1") = "Number"
For RowCount = 2 To 100
.Range("A" & RowCount) = RowCount

Next RowCount

End With
End With


End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top