Don't want Excel Headings

G

Greg

I am using an OutputTo command within a macro to export a query to an excel spreadsheet. Unfortunately, the field description is making its way to the spreadsheet as a column heading. I only want to data, not a heading
Is there a way to prevent this? Maybe I'm using the wrong macro command
Thanks in advance. -Greg
 
K

Ken Snell

No ...that is the way it works (as does TransferSpreadsheet action). One way
to avoid it would be to use Automation to open EXCEL via VA code, open a
recordest based on your table or query, and have the code write the data,
cell by cell, to the spreadsheet.

--
- - - - - - - - - - - - - - - - -
Ken Snell
<MS ACCESS MVP>

Greg said:
I am using an OutputTo command within a macro to export a query to an
excel spreadsheet. Unfortunately, the field description is making its way to
the spreadsheet as a column heading. I only want to data, not a heading.
 
G

Greg

Ken,
Thanks for the reply.
I don't have much experience with VBA. I wonder if it wouldn't be easier to use the original macro to copy to the spreadsheet, then have the header row removed. I'd still have to open the spreadsheet but it seems the remaining steps would be simple.
As ugly as it sounds, does this seem reasonable?
-Greg
 
K

Ken Snell

Unreasonableness is in the eye of the person who will need to do this. If it
works for you, then it's reasonable!

--

Ken Snell
<MS ACCESS MVP>

Greg said:
Ken,
Thanks for the reply.
I don't have much experience with VBA. I wonder if it wouldn't be easier
to use the original macro to copy to the spreadsheet, then have the header
row removed. I'd still have to open the spreadsheet but it seems the
remaining steps would be simple.
 

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