Copy and Export to CSV of a Pivot table output..

newuser17

New Member
Joined
Sep 12, 2018
Messages
13
Hi experts,

i am an newbie for the VBA and Power Query.. i will have to download reports from our old system and upload to new system everyday.. the downloaded file will have an pivot table output as below after cleaning data. what i need to be do is copy each output based on the kit no and Device to a separate CSV file. which is a duplicative task and the pivot table out put may go up 5000 rows..

each CSV files are names as KIT No & Device eg: AECWC00001 MCY

will any experts may help me to write an VBA/Macro to do this task ? copy each output group to separate CSV file in any folder ?


KIT NO
DeviceSequenceSum of Try
AECWC00001
MCY940000359719378

SECWC00135
MCY940000326273266
94000032627639
94000032628554
940000326286210
94000032628792
940000326289310
940000337058113

94000033863843
940000339179122
9400003816652
11

SECWC00136
MCY94000032627323

94000032627492
940000326276325
940000326277012

94000032627873
9400003262794
14
940000326285513

9400003262862
1
940000326289312

9400003370581
6
94000033917919
94000038166523


<colgroup><col style="mso-width-source:userset;mso-width-alt:3693;width:76pt" width="101"> <col style="mso-width-source:userset;mso-width-alt:2852;width:59pt" width="78"> <col style="mso-width-source:userset;mso-width-alt:3657;width:75pt" width="100"> <col style="mso-width-source:userset;mso-width-alt:2852;width:59pt" width="78"> </colgroup><tbody>
</tbody>

this will be the output of the CSV file.. for eg output for SECWC000135 MCY

Header1
Header2
Header3Header4Header5Header6Header7Header8Header9Header10
9400003262732 66
9400003262763 9
9400003262855 4
9400003262862 10
9400003262879 2
9400003262893 10
9400003370581 13
9400003386384 3
9400003391791 22
9400003816652 11

<colgroup><col style="mso-width-source:userset;mso-width-alt:3620;width:74pt" width="99"> <col style="mso-width-source:userset;mso-width-alt:2157; width:44pt" width="59" span="8"> <col style="mso-width-source:userset;mso-width-alt:2413;width:50pt" width="66"> </colgroup><tbody>
</tbody>

is this doable in power query ? or VBA ? either way i am more than happy to have a solution.

thanks in advance for your precious time and effort.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,214,982
Messages
6,122,575
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top