cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Reading in Partial Discharge data from Multiple Excel files

ptc-4889554
1-Newbie

Reading in Partial Discharge data from Multiple Excel files

Hello all,

I currently have 32 excel files that contain about 1000 data points each that I would like to somehow read into Mathcad.

The files are titled, scope_38.csv, scope_39.csv, ..., scope_70.csv.

These data files have 3 columns, containing the time in seconds, the partial discharge voltage and the AC voltage. Note that since the time window is so small the AC voltage is essentially constant. *SEE FILE ATTACHED FOR EXAMPLE*

What I want to do is plot a phase resolved diagram consisting of all the data points in the 32 files. (all the data points from 32 files on one phase resolved plot)

How can I compile all the data points in all 32 files into two arrays in order to create an xy scatter plot?

I imagine I could use a for loop to do it, but I'm not sure how I would read in the data and correctly place all the data points in the appropriate spots in the two individual arrays.

Could someone explain to me or provide me with an example as to how this can be done?

I'm going to make an attempt right now at trying to figure this out, but any help would be greatly appreciated.

Thanks again!

2 REPLIES 2

Here is my rough attempt at trying to figure out how to get this done. Obviously nothing works so far but hopefully it shows my basic idea.

There is a routine to read in the data and extract the appropriate sections.

This routine is then used in a for loop in which all the data is extracted from all 32 files and is somehow placed in the approriate vector.

Is there an easier way to do this? Also, I could not get my attempt to actually work but hopefully my idea is clear.

MCQ.JPG

Try the attached. Note that, as written, the workfile needs to be in the same directory as the Excel files.

Alan

Top Tags