×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Transfer data from MathCad to Ms Excel

Transfer data from MathCad to Ms Excel

Transfer data from MathCad to Ms Excel

(OP)
Hello,
Im a aerospace engineer (stress), does anyone know what's the best way to transfer data from Excel to Mathcad. I have this problem: I've got a method in a mathacad file that runs one case entering some data manually into the sheet. But I have to run 200 cases so I am thinking about design a macro VBA from excel that opens my mathcad method, enters the inputs (from excel) and obtans the outputs (to excel) afterwards in just one click. Any ideas about the code to use in the macro to I/O operations. I learnt FORTRAN at school so, no much Objcts Oriented Programming idea.
Thank you.
manurico

RE: Transfer data from MathCad to Ms Excel

There should be an add-in for Excel that allows you to embed a Mathcad worksheet inside your Excel.  You can then reference ranges in Excel for processing in Mathcad and get answers back.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

RE: Transfer data from MathCad to Ms Excel

(OP)
Thanks IRstuff for your response, I have tried that already and seems to work "almost" fine as I get some wierd errors. The problem is that, lets say that usually mathcad is NOT a very stable program and it becomes even less stable if you get it embeded into a excel file. What about doing it completely externaly from excel??
Thanks anyway for your help.
Manuel

RE: Transfer data from MathCad to Ms Excel

(OP)
At the moment I am only able to open the program MathCad externaly from a VBA macro in excel, but I don't know how to do for MathCad to open a concrete file (the one that contains the method I want to export/import data from/to excel ). Any idea about the VAB code, or any good tutorial?
Thanks  

RE: Transfer data from MathCad to Ms Excel

In Mathcad, have you tried Insert - Data - File Import (or Data Import Wizard) and select Excel, secify the data range?

RE: Transfer data from MathCad to Ms Excel

(OP)
Hi again,
I eventually managed to control the mathcad file inserting it in a excel file as a OLE object. Seems to work well, although it is not the cleanest thing in the world.
I was wondering if someone know how to send inputs to mathcad from a external source (.xls,.txt,.csv,...) and get the outputs back from mathcad to excel, etc... But doing all this without opening the mathcad file, but just creating a interface program in VB, that calls the M/C file and manages the data.
Thanks

RE: Transfer data from MathCad to Ms Excel

If this is M14, the file format is XML, but what then?  Your claim is that you needed Mathcad to run some calculations.

As for running mathcad, what's the issue?  You shell to the DOS shell, and call the program with the file you want it to run.  You have the Mathcad file output a .csv file and read it back in.
 

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources