View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
DomThePom DomThePom is offline
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