Skip to main content
1-Visitor
August 2, 2013
Solved

Returning Data from Excel Table, Mathcad 15.0

  • August 2, 2013
  • 1 reply
  • 10046 views

I have a table in excel and based on three input variables I need to return 1 output variable. Is it possible to just click on a cell and have that value become a variable to be used in subsequent calculations? I have attached the excel table below. What I need to do is return a value of Cf based on the grade, the width "d", and the thickness "b". For example if grade=structural, d=12, and b =3, then Cf would be 1.0 and if Grade = Stud and d=10 and b=4, then Cf would be 1.2. I need to have mathcad return the value of Cf to be used in later calulations. Thanks for any help.

Best answer by Werner_E

Here's a version without scripted components and numeric values for b and d.

Regards

1 reply

25-Diamond I
August 2, 2013

Wouldn't it be easier to hardcode that small table in Mathcad or is it mandatory to read the data from the excel sheet?

Anyway it would mean writing a Mathcad routine which provides the correct Cf, which would be very specific to the excel table provided. Texts like "2&3,4" or "14&wider" doesn't make an automatic interpretation easy.

In which way you would provide b and d and especially Grade?

What should happen if invalid values are given (d=7, or Grade=Utility and d=6)? Interpolation, error message?

Is it on purpose that for Grade=Utility width d is sorted in reverse order and that here Cf values are smaller for smaller d?

A good idea in my opinion would be the use of three listboxes to select the inputs from. maybe a look at Tom Gutman's AISC steel sheet (the data here is read from an Excel sheet, too) gives some inspiration.

http://www.imakenews.com/ptcexpress/e_article001573955.cfm

Heavenly1-VisitorAuthor
1-Visitor
August 2, 2013

What do you mean by hard coding into Mathcad table? It is not neccessary to do it through excel.

I would use a list/combo box for the grade and hard input for b and d.

The table is set for actual lumber sizes so the b and d will always match. This is a table from a design code similar to the AISC manual.

Yes that is the purpose and the values are correct.

I will look at Gutmans example thanks.

25-Diamond I
August 2, 2013

By "hard coding" I meant that the few values could be typed in a matrix in Mathcad so the file would be self contained. Using the Excel sheet makes sense if the table is large and/or if the table is to be changed from time to time.

See attached a way to do it with list boxes. I used a component from Richards collection http://communities.ptc.com/docs/DOC-1071

You will have to enable scripted components by clicking "No" at the message which pops up when the sheet is loaded.