Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pivot Table from external CSV file using VBA

Hi all,

I want to programmatically generate a pivot table using the data stored in a
csv file using VBA. I try using the PivotTableWizard object but don't know
how to specified the value for the parameter SourceData in this case.
Please help me out on this problem.

Thank you very much,
Anh Bui
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Pivot Table from external CSV file using VBA

Hi
I don't think you can use a csv directly as an external data source. I see 2
options
1. Open the csv in excel, do any parsing required and then use the range as
your xlDatabase sourcedata
2. Cretae an access mdb file and connect to your csv file. Then you can make
the access mdb an external datasource for your pivottable


"Anh Bui" wrote:

Hi all,

I want to programmatically generate a pivot table using the data stored in a
csv file using VBA. I try using the PivotTableWizard object but don't know
how to specified the value for the parameter SourceData in this case.
Please help me out on this problem.

Thank you very much,
Anh Bui

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pivot Table from external CSV file using VBA

Really? Since I was able to do this manually as following:
1-open PivotTAble and PivotChart Wizard
2-Select External data source and click Next
3-Click on "Get Data". In the Choose Data Source dialog, select <New Data
Source and click OK
4-In the "Create New Data Source", enter a certain name and select "Driver
da Microsoft para arquivos... (*.txt; *.csv)" at field number 2.
5-Click on the button "Connect" at field number 3 and select the folder
which contains the csv file
6-The select the csv file list in the combobox in field 4

The we will be able to select the column we want and generate the pivot
table directly from it.



"DomThePom" wrote:

Hi
I don't think you can use a csv directly as an external data source. I see 2
options
1. Open the csv in excel, do any parsing required and then use the range as
your xlDatabase sourcedata
2. Cretae an access mdb file and connect to your csv file. Then you can make
the access mdb an external datasource for your pivottable


"Anh Bui" wrote:

Hi all,

I want to programmatically generate a pivot table using the data stored in a
csv file using VBA. I try using the PivotTableWizard object but don't know
how to specified the value for the parameter SourceData in this case.
Please help me out on this problem.

Thank you very much,
Anh Bui

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
create pivot table from external csv file Sunny[_3_] Charts and Charting in Excel 5 February 12th 09 05:11 PM
Pivot Table from External Data? geordie_phil Excel Discussion (Misc queries) 1 June 26th 08 11:13 AM
Pivot Table Data Source external excel file IH Excel Discussion (Misc queries) 4 November 4th 06 02:42 AM
Pivot Table external XLS file source change and GETPIVOTDATA refresh mbobro Excel Discussion (Misc queries) 0 July 8th 06 12:45 PM
Working With Pivot Table And External DB Frank Excel Discussion (Misc queries) 0 June 14th 05 08:32 AM


All times are GMT +1. The time now is 06:01 AM.

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

About Us

"It's about Microsoft Excel"