Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Pivot table in Excel. Exported data from access as excel sheet.

Hi,

I am looking for a fix in below code, probably addition to it.
I'm trying to export a query from ACCESS 2003 to EXCEL 2003.
I do that each time with the export to excel button available in
access which generates a temp file which I have to save all the time
by naming it into appropriate excel file format.

So far I have managed to export only the data sheet.
I'm stuck with creating the pivot table portion.

These few lines I found while browsing and changed them w.r.t. my
requirements.

I would like to have a pivot table in sheet2 based on data range in
sheet1.

Code is below:
----------------------
Public Sub TransferReport()


Dim varFileName As String


varFileName = "C:\MyFile.xls"


'EXPORT DATA
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "Month
End Report", varFileName, False, "Sheet1"


End Sub
----------------------


Thanks
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exporting data to Excel pivot table from Access Pat Dools Excel Discussion (Misc queries) 3 October 22nd 08 06:49 PM
Excel form to update data from MS Access data table based on criteriain excel sheet Santa-D Excel Programming 2 May 13th 08 03:43 AM
Get data from Access tables in an Excel pivot table Herrie Excel Programming 2 November 15th 07 09:45 PM
Access Create Excel Pivot Table Data Source [email protected] Excel Discussion (Misc queries) 0 July 12th 06 09:35 PM
Access table exported to Excel does not preserve blank cells Mike Collard Excel Programming 0 July 20th 04 08:05 PM


All times are GMT +1. The time now is 09:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"