Skip to main content
1-Visitor
September 1, 2010
Question

READFILE

  • September 1, 2010
  • 3 replies
  • 17678 views

I'm attempting to use MathCAD to do some data analysis but running into a problem. On the computers in the lab, my data was saved as file format "Microsoft Excel 2007 Workbook" (.xlsx). I'd like to use the READFILE function to extract that data into MathCAD. READFILE is giving me an error when I try to use the original format (.xlsx) but when I save that same file with the version of Excel I have on my computer (Excel 2000, .xls) READFILE works fine. I'd rather not save each of the .xlsx files as .xls because I have quite a few.

Does READFILE not work with that version of Excel?

3 replies

1-Visitor
September 1, 2010

Not too sure, but Excel saves *.csv [default]. In Mathcad you must then use the insert component and go to the specifications governing the read. READFILE is an extra from the MATHCAD 11 DAEP [Data Analysis Extension Pack]. If you could save your Excel as *.dat or *.txt, you would then READPRN directly w/o the read component.

jmG

1-Visitor
September 2, 2010

I tried playing around with "Insert Component" but I didn't have much luck with that either. I had considered saving all the Excel files as text files and then using READPRN but I was trying to avoid having to change each file manually. Is there a way to choose a set of files and convert them easily? I only have about 13 different files but I would prefer it if there was a quick solution. If worst comes to worst, I'll just manually save the files as text and go from there.

Not the end of the world, just wondering if there was a quick answer!

1-Visitor
September 2, 2010

What version of Mathcad are you running?

Mike

I just lost this reply when hitting post and the "Use Recovered" button managed to retrieve one letter.

Mike

1-Visitor
September 2, 2010

Oh sorry, I'm using MathCAD 14.

1-Visitor
September 2, 2010

Is something like this what you are looking to do?

1-Visitor
September 3, 2010

Alright, here's the sheet and data. I created two different Excel files, one saved as 2000 and the other as 2007. When using READFILE, I choose to not specify the directory and just saved the MC file in the same place as the Excel files.

1-Visitor
September 3, 2010

____________________________________

An interpolation added for the 1rst Fourier period

1-Visitor
September 3, 2010

Hehe, either Stephen or Steven is fine. Thanks for the Fourier analysis! I hadn't tried it yet. How did you import the data into MathCAD? While that file is very useful, it still doesn't answer my original problem with Excel 2007.

The data is just some basic high frequency/low frequency interference on a simple periodic signal.