Exporting a PivotTable (Filtered) to an excel spreadsheet

Zorkmid

Registered User.
Local time
Today, 04:06
Joined
Mar 3, 2009
Messages
188
Hi all,

I currently have a database that I use to push out reports in the form of pivotcharts. I have a main form that has the ability to filter my data via a subform in pivotchart view. What I have been doing is export these filtered charts as pictures and building reports that way.

Like this

Code:
Private Sub Export_Click()
Dim frm As Form
'Dim strForm As String
Dim strFile As String
Dim strDir As String
    strDir = "G:\Admin\Ceo\Human Resources\RISKMGMT\Inhouse data\Risk Database\Charts\"
        strForm = Me.Time_Subform.Form
        strFile = "Reports over Time" & ".gif"
'       DoCmd.OpenForm strForm, acFormPivotChart
        Set frm = Me.Time_Subform.Form
        Set cht = frm.ChartSpace
        cht.ExportPicture strDir & strFile, , 1024, 720
  '      DoCmd.Close acForm, strForm
    
    If MsgBox("Your Graph has been exported ", vbOK) = vbOK Then
        End If

    
End Sub



Is there a way that I can set the subform to pivottable view and export the filtered data into an excel spreadsheet? I need to add other data to these charts from other sources and excel would be a great way to do so.

Please let me know, or any me if there is anything that I can clarify.

-Z
 
Zorkmid,

PivotTables are just forms in different display, so I'm not sure what you're getting at. Are you wanting to export the actual view of the PivotTable in Access to Excel? If you're simply interested in exporting the data behind the filtered Pivot, couldn't you just write a query with the same filter and export it as well? That data would be exactly the same...
 

Users who are viewing this thread

Back
Top Bottom