Skip to main content
1-Visitor
October 25, 2011
Solved

Excel to Mathcad and Mathcad to Excel data transfer

  • October 25, 2011
  • 1 reply
  • 27949 views

Dear all,

I got thanks a discussion chain some Mathcad macro's to read data in any worksheet in an excel file but thw woksheet name has to be known.

My data acquisition system generates automatically excel data table with every time new worksheet names.

Is it possible to obtain all the worksheet names of an excel file directly from Mathcad ?

Second question:

It is possible to read directly from Mathcad data within worksheet of Excel file and it works well.

Is it possible to do the reverse, ie to write data direclty from Mathcad in specific worksheets of an excel file ?

I have Mathcad 14 (will have mathcad 15 next year)

Thank you

P.Bujard

Best answer by MikeArmstrong

The answer is yes to both.

Firstly have a look at the attached worksheet. It reads tabs within a specified Excel worksheet. Save both worksheets to your desktop before running the scripted component.

Mike

1 reply

1-Visitor
October 25, 2011

The answer is yes to both.

Firstly have a look at the attached worksheet. It reads tabs within a specified Excel worksheet. Save both worksheets to your desktop before running the scripted component.

Mike

1-Visitor
October 26, 2011

Thank you Mike,

As far as I remember I already got from you the macros to extract data from excel files.

Now I can read the tabs name without having to open the excel sheet, thank you because contrary to Excel I am not skilled at all to write macros in Mathcad.

The unique things which is still missing is to be able to write data from Mathcad toward a specific worksheet in Excel.

Patrice

1-Visitor
October 26, 2011

have you got the WRITEXCEL function in M14, forget. If so, you now know the Excel tab names you can use that. Please see below for an example.

Clipboard01.jpg

Mike