Skip to main content
1-Visitor
January 31, 2012
Question

Mathcad 15 & Excel 2003

  • January 31, 2012
  • 2 replies
  • 6439 views

Hi everyone,

I have a question about compatibilities between Mathcad and Excel :

I wrote a mathcad file with Mathcad15, where I use the function READEXCEL.

It works fine when I use my PC, with Windows7, Mathcad 15, Excel 2007 (.xlsx).

But it failed when I use a PC with Windows XP, Mathcad 15, Excel 2003 (.xls) : the function readexcel returns "corrupted data" when pointing to the .xls file ; the problem is : the application have to be used with the "WindowsXP, mathcad15 and excel 2003" configuration (because it's the client configuration).

Is the add-in for excel could fixe the problem in that way ??

Thank you all for your time and response,

Cécile

2 replies

1-Visitor
January 31, 2012

Hi Cecile

For 2003 Excel files in Mathcad 15 use the READFILE function with the "excel" file type.

For 2007 excel files in Mathcad 15 use the READEXCEL function

Good luck

John

cairo-21-VisitorAuthor
1-Visitor
January 31, 2012

Hi John and thank you for your answer.

I already tried Readfile, but I have almost ten sheets in one excel workbook.

I couldn't figure out how to specify the name of the sheets with the Readfile function.

Is there a way to do that?

Another lead was to do "Insert/File Input" (cf. thread http://communities.ptc.com/message/60487#60487) but I have to read the files dynamically so I can't do it following that solution.

Any idea ?

Thanks again,

Cécile

1-Visitor
February 1, 2012

Have you tried using a scripted component? I have passed many over the last few years.

Mike

24-Ruby III
February 1, 2012

Hello!

cecile airo wrote:

But it failed when I use a PC with Windows XP, Mathcad 15, Excel 2003 (.xls) : the function readexcel returns "corrupted data" when pointing to the .xls file ; the problem is : the application have to be used with the "WindowsXP, mathcad15 and excel 2003" configuration (because it's the client configuration).

You need to use the following: in main menu select "Insert" -> "Component" -> "Microsoft Excel" (to specify an Excel worksheet, use the command ("SheetN!", where "N" - number one of the sheets in your Excel file)):

Pic_1.png

Pic_2.png

Pic_3.png

Pic_4.png

1-Visitor
February 1, 2012

The problem with this approach is that the Excel worksheet becomes redundant and cannot be changed via Excel, so if further data is required a new worksheet will have to loaded.

Also, you will be increasing the size of the Mathcad file because you are holding all the Excel worksheets inside Mathcad.

A decent workaround though.

Mike

1-Visitor
February 1, 2012

Just and FYI ... These issues have been fixed in Mathcad Prime1.0. You can specify the sheet number on both read and write Excel.