Skip to main content
10-Marble
September 26, 2025
Solved

API Code Assistance

  • September 26, 2025
  • 2 replies
  • 576 views

Hi,

I’m looking for some help with coding a script that can extract information (such as section type and associated loads) from an external source, like Excel, and import it into a developed Mathcad sheet. The goal is to check section capacity in accordance with the relevant codes and standards.

I appreciate this request may be a bit broad, and I am aware some example codes exist here: Code Examples. However, as I’m new to this, I would greatly appreciate any guidance or assistance in streamlining the script.

Kind regards,
Iain

 

Note, I am using Mathcad Prime 10.0.0.0 

 

Edit: 

 

We are looking to create Mathcad files based on an original worksheet, using externally sourced data from Excel.

Best answer by IA_12699372

Thank you for the help, will take a look. 

2 replies

21-Topaz II
September 26, 2025

Hi,

You can use READEXCEL and WRITEEXCEL simple functions to exchange data with EXCEL rather than the more cumbersome API coding.

Look them up in help.  You can use a helper wizard on the menu ribbon to use READEXCEL..  Input/Output | Data Import/Export | ReadExcel.

Capture.JPG

Cheers

Terry

10-Marble
September 26, 2025

Thank you, apologies, I have updated my request in the original post. 

7-Bedrock
September 29, 2025

Take a look at the source code for the MathcadPy library along with the examples to see how you can interact via Python. The VBA commands in Excel are pretty similar to the backend code of that library.

https://github.com/MattWoodhead/MathcadPy/blob/master/examples.py

IA_1269937210-MarbleAuthorAnswer
10-Marble
September 30, 2025

Thank you for the help, will take a look.