Need to export a pivot chart view of a query

G

Guest

Hi -

I need to export the pivot chart view of a query to a word or excel document
so that it can be emailed or saved.

Any ideas?
 
L

LeAnne

AmandaM said:
Hi -

I need to export the pivot chart view of a query to a word or excel document
so that it can be emailed or saved.

Any ideas?

Several:

- Highlight all the fields/columns in your xtab query in Datasheet View
and Copy/Paste to Word or Excel

- OR select your xtab query in the Database Window, select File > Save
As/Export, click the "To an external file or database" radio button,
then choose the preferred file type & destination.

- OR select your xtab query in the Database Window and use the
OfficeLinks toolbar button to "Analyze it with MS Excel" or "Publish it
with MS Word".

- OR to email the output of the query directly, select your xtab query
in the Database Window, then select File > Send and follow the prompts.

That should get you started!

hth,

LeAnne
 
G

Guest

Thanks LeAnne - Unfortunately none of those options work, I still get the
datasheet pulling over rather than the chart.
 
L

LeAnne

Could you clarify what you have and what you are trying to do? Did you
create a crosstab query (sometimes called a pivot table) that you wish
to export to Excel? Or did you use ChartWizard to add a chart to an
Access form or report?

LeAnne
 
L

LeAnne

LeAnne said:
Could you clarify what you have and what you are trying to do? Did you
create a crosstab query (sometimes called a pivot table) that you wish
to export to Excel? Or did you use ChartWizard to add a chart to an
Access form or report?

PS. Forgot to include this part. You didn't say which version of
Access/Office you are working with. But if you are working with a Chart
object created in a From or Report in A97:

- Open the Form or Report containing the graph in Design View
- Right click on the Chart object and Select Chart Object > Edit
- Microsoft Graph should open 2 windows: a datasheet view of the
RecordSource data, and the chart itself
- From the menu bar select Edit > Copy Chart
- You can now paste the chart into Excel or Word as an EMBEDDED object.
See Excel Help for information about working with embedded charts. Or
you can Paste Special the graph as a .jpg or other picture format if you
prefer.

hth,

LeAnne
 
G

Guest

Hi LeAnne-

I'm working in Access 2003. I created a "select" query. When I had it
showing the data I wanted to chart, I went to >View>Pivot Chart View. In that
window I created the Pivot Chart and saved it so that each time I run this
query I can click over to pivot chart view to see the charted data. (which
ultimately I would like to export)I hope this makes more sense.

Thanks for your help.
 
L

LeAnne

AmandaM said:
Hi LeAnne-

I'm working in Access 2003. I created a "select" query. When I had it
showing the data I wanted to chart, I went to >View>Pivot Chart View. In that
window I created the Pivot Chart and saved it so that each time I run this
query I can click over to pivot chart view to see the charted data. (which
ultimately I would like to export)I hope this makes more sense.

Thanks for your help.

<wince> I'm afraid I'm not at ALL familiar with that functionality.
Anybody else knowledgeable in A03 want to take a crack at this?

Sorry,

LeAnne
 
L

LeAnne

AmandaM said:
Hi LeAnne-

I'm working in Access 2003. I created a "select" query. When I had it
showing the data I wanted to chart, I went to >View>Pivot Chart View. In that
window I created the Pivot Chart and saved it so that each time I run this
query I can click over to pivot chart view to see the charted data. (which
ultimately I would like to export)I hope this makes more sense.

Thanks for your help.

PS. Amanda, here's a link to an article I found at office.microsoft.com:

http://office.microsoft.com/en-us/assistance/HA010345791033.aspx

Scroll down to "Samples for PivotChart view" and click on "Export the
PivotChart View as an image." There's a snippet of VBA code that will
enable you to export the chart object as a .gif.

LeAnne
 
G

Guest

Thank you!!! I'm sure that will help...now I just have to get the code in
there. At least now I know it's possibble.
 
G

Guest

Did you find out how to use the code for exporting the chart?
I have the same challange exporting graphs.


Jan
 
G

Guest

How hard does this need to be. I have the same problem and it would be great
to have a solution that doesn't require learning how to program in visual
basic. I have resorted to taking a screen capture (print screen button) and
pasting it to a word document (ctrl + V). There must be a better way.
 
G

Guest

still i do not succeed to do this, even with the code
Me.ChartSpace.ExportPicture "pathname\filename.gif"

i put the pivot chart in a subform and on the major form a button with the
code
Me.ChartSpace....

i gte the message :
"object closed or does not exist

what do i do wrong ?
 
J

jordanjennings

Ahhh...looks like I'm another person stuck on this endless quest since
I'm having this same problem as well! I've been scouring the internet
for DAYS and have found no helpful mention on how to export a pivot
table view to excel. It's such a useful feature that I was totally
surprised that I didn't find the answer in like five minutes. I did
find that article that is linked above, but it's just frustrated me
because now I know it can be done but I just can't figure out how to do
it.

Just FYI (not to insult anyone's intelligence) but you can export a
pivot table to excel and keep the correct formatting by going to pivot
table view and right clicking on the title bar (if the window isn't
maximised) and clicking "Export to Excel". I haven't tried doing this
on a PivotChart but I would think it would work the same. If not it
should be easy to make a pivot chart right off the pivot table.

However, that still doesn't solve my problem...which is automatically
exporting a query in pivot table view. Looks like the article linked
above will only work when you are viewing a FORM in pivot table mode,
not a query. I'm going to try setting the recordsource (or is it
recordset?) of a form to my query and then using:
"Me.PivotTable.Export" tomorrow to see if I get any luck with that.
 
G

Guest

I just do screen print, then paste to paint and cut and copy what i need and
dont need, its the best way i know of.
 
G

Guest

I have the problem, I tried the solution given in the article but it doesn't
work. I wanna export the chartspace (from a userform) to a gif file. but I
get an error message
"class does not support automation or does not support expected interface"

my program is:
Dim stFileName As String
Dim owcChSpace As OWC11.ChartSpace

Set owcChSpace = Me.ChartSpace1

'Create the filename.
stFileName = _
Replace(CStr(Date), "-", "") & _
Replace(CStr(Time), ":", "") & ".gif"

With owcChSpace
'Temporarily hide the toolbar.
.DisplayToolbar = False
'Export to a standalone GIF-file.
.ExportPicture _
Filename:="c:\My Documents\" & stFileName, _
FilterName:="gif", _
Width:=700, _
Height:=440
'Display the toolbar again.
.DisplayToolbar = True
End With

MsgBox "Done!", vbOKOnly, "OWC Chart"

Set owcChSpace = Nothing
 
G

Guest

Thanks LeAnne,
I got this to work. I read the rest of the postings where everyone had
trouble and thought I would share...

On the chart's On Double Click property, I put in the following code:

Private Sub Form_dblClick(Cancel As Integer)
Me.ChartSpace.ExportPicture "H:\My Documents\My Pictures\Name.gif", , 930, 720
MsgBox "done"
End Sub

When the chart is open, I can double click anywhere on the chart and the
..gif is created.
By the way, the .gif is clearer & less grainy than the "Ctrl+Print Screen
Paste" method when on powerpoint; and with a little trial and error found
that the 930x720 fits onto the ppt slide without resizing.
 
G

Guest

I've read through the thread and I must be close but I'm still getting errors.

Using the On Double Click property written below I get the error "The
expression you entered refers to an object that is closed or doesn't exist."

Help! Why is it that this is so difficult to do and to find instructions
for? It's a great new feature but useless if it can't be exported.
 
G

Guest

My company recently upgraded to access2003. Now the code that I posted
earlier doesn't work. It's driving me crazy...
 
G

Guest

That's what I use as well - Access2003. I can't get anything to work! It's
incredibly frustrating. The best solution I've found is to save as a PDF and
then cut out the image from there to paste into Word/Powerpoint.
 
M

makyland

I know this post is a bit old... buy maybe I could be of help.

As far as I've found out the "exportpicture" method starts failing after the
upgrade of OWC10.dll. You can check your dll version in path:
C:\Program Files\Common Files\Microsoft Shared\Web Components\10

I've seen it starting to fail from version: 10.0.6765.0

If you're able to get a copy of a previous version of the dll (I can let you
know that version 10.0.5605.0 still works!) you can replace "the newest one"
by the one where the method actually works. (If you don't want to lose the
newest one just rename it and keep it safe...)

However, this is a bit "dirty" if you're trying to distribute the oldest dll
as part of your solution as installation package might not attempt to replace
a newer dll by an older one... and you might end up asking your users to
manually change the dlls... (which is not very ellegant though...). But if
you're using this functionality for yourself it will do!

I'm wondering if this issue has been solved with Access 2007, there is any
hotfix for this for Access 2003 or there is any way to make the method work
with the newer version of the dll.

Has anyone read any direct feedback from Microsoft?

Thanks in advance for any comments on this!
 

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