Skip to main content
1-Visitor
Sep 1, 2010 10:20 PM UTC
Question

READFILE

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?

29 replies

1-Visitor
Sep 1, 2010 11:24 PM UTC

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

Translate
1-Visitor
Sep 2, 2010 5:37 AM UTC

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!

Translate
1-Visitor
Sep 2, 2010 6:39 AM UTC

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

Translate
1-Visitor
Sep 2, 2010 4:16 PM UTC

Oh sorry, I'm using MathCAD 14.

Translate
1-Visitor
Sep 2, 2010 5:01 PM UTC

Is something like this what you are looking to do?

Translate
1-Visitor
Sep 3, 2010 4:22 PM UTC

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.

Translate
1-Visitor
Sep 3, 2010 6:10 PM UTC

____________________________________

An interpolation added for the 1rst Fourier period

Translate
1-Visitor
Sep 3, 2010 9:53 PM UTC

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.

Translate