Group:  Microsoft Access ยป microsoft.public.access.externaldata
Thread: Export Access Query to Excel (both 2003)

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Export Access Query to Excel (both 2003)
"Rubix via AccessMonster.com" <u25393[ at ]uwe> 17.08.2006 13:28:50
Hi everyone, I'm new to this forum and beforehand, I'd like to thank everyone
for any help received.

I have searched the archives and read a number of links within them and I
can't figure out how to export a qry to xl.

I'm not very good with code, I can read it pretty well, but I have no idea,
even with the code builder helping, exactly how to write the syntax.

If anyone could help me out with the sytax and where to put it to connect to
a button that exports (which I'm sure is relatively easy and I'm just having
a brain-fart), it would be much appreciated.

As an extra, and I've looked around on this and it may not be able to be done,
I'd would like it to export to a preformatted worksheet or build a macro
within excel that I could link to the access button so that when it exports,
the macro would format it.

I saw something about it in a thread I can no longer find (real simple
formatting like font=arial, size=10pt, alignment=centered, etc).

Once again Thanx beforehand!

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-externaldata/200608/1

RE: Export Access Query to Excel (both 2003)
Klatuu 17.08.2006 16:28:01
Exporting a query to an Excel spreadsheet is very simple. You use the
TransferSpreadsheet method or Action. You can get detailed info in VBA
Editor Help.

As to the formatting. It is not that simple. Only the data is copied, not
the formatting. Unless you are proficient in VBA and know the Excel Object
Model, you probably will not be able to do it.

"Rubix via AccessMonster.com" wrote:

[Quoted Text]
> Hi everyone, I'm new to this forum and beforehand, I'd like to thank everyone
> for any help received.
>
> I have searched the archives and read a number of links within them and I
> can't figure out how to export a qry to xl.
>
> I'm not very good with code, I can read it pretty well, but I have no idea,
> even with the code builder helping, exactly how to write the syntax.
>
> If anyone could help me out with the sytax and where to put it to connect to
> a button that exports (which I'm sure is relatively easy and I'm just having
> a brain-fart), it would be much appreciated.
>
> As an extra, and I've looked around on this and it may not be able to be done,
> I'd would like it to export to a preformatted worksheet or build a macro
> within excel that I could link to the access button so that when it exports,
> the macro would format it.
>
> I saw something about it in a thread I can no longer find (real simple
> formatting like font=arial, size=10pt, alignment=centered, etc).
>
> Once again Thanx beforehand!
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-externaldata/200608/1
>
>
RE: Export Access Query to Excel (both 2003)
"Rubicante via AccessMonster.com" <u25393[ at ]uwe> 17.08.2006 17:33:21
I've been able to export finally, but I swore I saw something on this site
about how to format it.
Nothing fancy, just a simple format that will allow the user to differentiate
between the heading and the table, etc.
Also, is there anyway to open it form the export btn?
If so, where would I add the code to make it run?

Klatuu wrote:
[Quoted Text]
>Exporting a query to an Excel spreadsheet is very simple. You use the
>TransferSpreadsheet method or Action. You can get detailed info in VBA
>Editor Help.
>
>As to the formatting. It is not that simple. Only the data is copied, not
>the formatting. Unless you are proficient in VBA and know the Excel Object
>Model, you probably will not be able to do it.

--
Message posted via http://www.accessmonster.com

RE: Export Access Query to Excel (both 2003)
"Rubicante via AccessMonster.com" <u25393[ at ]uwe> 17.08.2006 17:34:51
I also saw something about exporting the information from the qry/tbl into an
existing worksheet/book by using the something called a SelectRange function
or something like that.

Klatuu wrote:
[Quoted Text]
>Exporting a query to an Excel spreadsheet is very simple. You use the
>TransferSpreadsheet method or Action. You can get detailed info in VBA
>Editor Help.
>
>As to the formatting. It is not that simple. Only the data is copied, not
>the formatting. Unless you are proficient in VBA and know the Excel Object
>Model, you probably will not be able to do it.
>
>> Hi everyone, I'm new to this forum and beforehand, I'd like to thank everyone
>> for any help received.
>[quoted text clipped - 18 lines]
>>
>> Once again Thanx beforehand!

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-externaldata/200608/1

RE: Export Access Query to Excel (both 2003)
Klatuu 17.08.2006 17:41:03
Yes, you can select a range. See VBA Help on TransferSpreadsheet for that.
It will say that it doesn't work with the export option, but it really does.

"Rubicante via AccessMonster.com" wrote:

[Quoted Text]
> I also saw something about exporting the information from the qry/tbl into an
> existing worksheet/book by using the something called a SelectRange function
> or something like that.
>
> Klatuu wrote:
> >Exporting a query to an Excel spreadsheet is very simple. You use the
> >TransferSpreadsheet method or Action. You can get detailed info in VBA
> >Editor Help.
> >
> >As to the formatting. It is not that simple. Only the data is copied, not
> >the formatting. Unless you are proficient in VBA and know the Excel Object
> >Model, you probably will not be able to do it.
> >
> >> Hi everyone, I'm new to this forum and beforehand, I'd like to thank everyone
> >> for any help received.
> >[quoted text clipped - 18 lines]
> >>
> >> Once again Thanx beforehand!
>
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-externaldata/200608/1
>
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net