Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Information Inserted 1

Status
Not open for further replies.

fegenbush

Mechanical
Apr 5, 2006
783
In the attached file, I have an embedded excel spreadsheet. I have not been able to find information on how to insert data into this and retrieve data from it. The information I have found only relates to external excel files. The spreadsheet is used for table display purposes only, so if there is a better way to do this, I'm all ears.

The issue that brought this up is that one of the array values will not display into the necessary cell. Only one value of the array behaves this way. Any insight into the problem would be most appreciated.
 
Replies continue below

Recommended for you

I do this all the time without tiptoeing through Excel. I would define the entire output table at the beginning, with the zero row being the column headers (just put double quotes in a cell to make it a text block) and load the input columns into that table.

Then you work with a two dimensional array for your output. It really is easier than trying to make a live link work properly. Live links can work, but they can also be touchy.

David
 
IRstuff,

I attempted to isolate the problem. The actual calculation can have any number of "courses" as shown in column 1 of the table. These are index values.

Getting the values to display properly in the table is problem 1.
td is usually shown as tdi (imagine subscripts) where i ranges from 0 to course-1. Since I usually don't know the number of courses when starting a project, this allows me to be flexible.

Being able to pull the user input information in the last column is problem 2. The idea is for the mathcad sheet to tell you that 0.987 is the minimum and for the user to input the convenient value of 1.0. Mathcad would then calculate some other value using that user input number.

I hope this makes things clearer.
 
I assume you're referring to cell D4 being 0? If so it's because there's an error in the input variables, although with 41 input variables(!!) it's difficult to see this, and it will get even worse if you ever expand the table. I would suggest deriving your table inputs using a for loop, and having just one input variable to your table (or at most one per column). See the attached.

Peter
 
 http://files.engineering.com/getfile.aspx?folder=653a4336-71a0-49f6-9995-eed75d8699ce&file=test-1_v2.xmcd
Peter,

That's the type of answer I was looking for. Thank you for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor