Skip to main content
1-Visitor
May 21, 2021
Solved

Query and select from excel file

  • May 21, 2021
  • 1 reply
  • 5733 views

I have an excel file that contains material property data.  I have several sheets in the file; Aluminum, Titanium, Steel etc.   Each sheet contains data for several alloys, one for each row.

 

In Mathcad Prime 7, I would like to be able to select a material of choice.  I thought of having a combi box that selected what type (Aluminum, Steel etc), then a 2nd combi box that would show a list of materials based on the type and allow the user to select the material from that list.  Once the user selects, I would like to load the material property data for that specific material.  It is important that once the Mathcad file is saved and closed that it retains the selections that were in the combi box.

 

Is this possible?  Maybe there is a better way...

Best answer by ptc-1643766

Terry, that worked great.  Thanks!

I have a couple other things I can't find answers to.

1) Can I hide the collapsed region line from the print or save as pdf?

 

2)  Is there a way to show a variable's definition without the "" and without seeing the variable name.  Example:  I want to put the name of the material that was extracted from the excel sheet into the Header show it shows on each page like a title block but I don't want to see Material = "4340 Steel", I just want to see 4340 Steel.

 

Thanks again

1 reply

21-Topaz II
May 23, 2021

Hi

Can you supply the EXCEL workbook if not propriety so I can try with Prime to show how it can be done?

Cheers Terry

1-Visitor
May 23, 2021

Thanks Terry.  See attached.

 

Scott

21-Topaz II
May 23, 2021

Hi,

This is not elegant but it works.

Changed your material file.  Have added a title row to the top where missing on one of the sheets.  Have changed the name of the EXCEL file so it is date stamped.

You will need to set the path to the EXCEL file to suit your system.  Printed a PDF so you can see it working.

You can index individual properties out of the final derived matrix.  Have not done this, left it for you.

 

You simply select two index numbers, feedback is given on the selections.  The sheet when saved keeps the selections.

 

Cheers

Terry