Export to Spreadsheet or equivilent

P

Phil Smith

I can across this, which seems to suggest it is possible to put data
into an Excel named range. Requirement is named range must be more than
one cell.

http://alexdyb.blogspot.com/2006/07/export-to-excel-range.html

When I try it, I get an error message stating there are more than 255
output fields. Since I have 12, it is a bogus error.

I have a fairly complex Excell Pivot table based on the data in a
certian part of a worksheet. Currently, we run an access query,
manually cut and paste the data into the worksheet, and manually update
the range of data that the Pivot table use.
Manual sucks. That's what the computer is for.

I could probably build a macro that would recreate the named range after
the fact, but the data coming out will be a different amount of rows
each time.

Is there any way to throw data into a named range that actually works?
Excel and Access 2003.

Thanx
Phil
 
P

pietlinden

I can across this, which seems to suggest it is possible to put data
into an Excel named range. Requirement is named range must be more than
one cell.

http://alexdyb.blogspot.com/2006/07/export-to-excel-range.html

When I try it, I get an error message stating there are more than 255
output fields. Since I have 12, it is a bogus error.

I have a fairly complex Excell Pivot table based on the data in a
certian part of a worksheet. Currently, we run an access query,
manually cut and paste the data into the worksheet, and manually update
the range of data that the Pivot table use.
Manual sucks. That's what the computer is for.

I could probably build a macro that would recreate the named range after
the fact, but the data coming out will be a different amount of rows
each time.

Is there any way to throw data into a named range that actually works?
Excel and Access 2003.

Thanx
Phil

Check out this link. Complete with code...
"Transferring Records to Excel with Automation"
http://www.mvps.org/access/modules/mdl0035.htm

see this section...
Sub sCopyRSToNamedRange()
'Copy records to a named range
'on an existing worksheet on a
'workbook
 
P

Phil Smith

Thanx

Do you know if this results in a range that is the size of the copied
data, No more no less? The amount of data will vary quite a bit from
run to run, and my pivot will die if it is not ranged exactly.
 
P

pietlinden

I can across this, which seems to suggest it is possible to put data
into an Excel named range. Requirement is named range must be more than
one cell.

http://alexdyb.blogspot.com/2006/07/export-to-excel-range.html

When I try it, I get an error message stating there are more than 255
output fields. Since I have 12, it is a bogus error.

I have a fairly complex Excell Pivot table based on the data in a
certian part of a worksheet. Currently, we run an access query,
manually cut and paste the data into the worksheet, and manually update
the range of data that the Pivot table use.
Manual sucks. That's what the computer is for.

I could probably build a macro that would recreate the named range after
the fact, but the data coming out will be a different amount of rows
each time.

Is there any way to throw data into a named range that actually works?
Excel and Access 2003.

Thanx
Phil

You could also use .UsedRange in Excel and go from there.
 

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