cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Translate the entire conversation x

Read the results from another Mathcad prime

YA_10963798
14-Alexandrite

Read the results from another Mathcad prime

Hi there 

I tried to input the results from another mathcad file , but I guess I'm doing that wrong > in the following image I'm trying to import the results of ( R) 

YA_10963798_0-1762250869311.png

What is the correct function to import the results from one mathcad file to another?

When I searched in the community I found very old version which doesn't open in my laptop 

Thanks

Yusra

 

ACCEPTED SOLUTION

Accepted Solutions

Hi, Yusra.

 

Do you still see errors when you include the worksheet in a blank worksheet?  Does your new worksheet have the same ORIGIN  as the one you want to include?

 

Are you sure that there are -- no -- errors, even minor ones, in the original worksheet?  I've had cases where I left an evaluation with an error.  Although the rest of the worksheet was fine, that one error flagged the whole sheet as having errors when I included it.

 

As for making the worksheet easier to read, do as I suggested above:  cut & paste the whole contents into an Area, then collapse the Area.  That means all of the workings will be hidden.  You could even lock the Area to prevent others having access to the Area if you're, say, sending the worksheet to a third-party.

 

The once caveat with Areas, though, is that a Mathcad Prime Area can't include Areas, so you'd have to partition the worksheet into several (collapsed) Areas.

 

Stuart.

View solution in original post

8 REPLIES 8
Werner_E
25-Diamond I
(To:YA_10963798)

You may want to lookup the syntax of READFILE in the help -> Search: READFILE

Was the file written by WRITEFILE? 

The second parameter in READFILE should be the type, which can be "delimited", "fixed" or "Excel", but not "Mathcad Worksheet".

etc.

YA_10963798
14-Alexandrite
(To:Werner_E)

So I should first write the results in the other files in ( WRITEFILE) and then insert them to the new mathcad file ? Is that what you are saying ?

Werner_E
25-Diamond I
(To:YA_10963798)

I am not sure what exactly you a trying to achieve.

Is the file you try to read from a Mathcad worksheet? Then you cannot read-in variables from it using any of the READ.... functions!

You could 'include' it

Werner_E_0-1762256206094.png

This acts as if the content of the included worksheet would have been typed in at the position of the "include". So of course you also have access to the variables therein.

 

If you just intend to transfer a couple of variables you may be better off if you save it (maybe as an Excel file using WRITEEXCEL or by using any of the other WRITE... functions) and use the corresponding READ.... function to read in the data. But we are talking about the numerical values only, units will get lost during that process and you would have to add them yourself after reading in the data.

 

YA_10963798
14-Alexandrite
(To:Werner_E)

I guess include is the right thing to do as I'm trying to just have the values in the other sheet . However, it shows me this error , which I don't think is the case 

there are no errors in the other sheet 

YA_10963798_0-1762258504771.png

 

One thing to beware of is that an included worksheet picks up any definitions made before it was included (or after if any definitions used global define).

 

So, a worksheet might not have any errors when run on its own, but it might if it picks up, say, a function definition that was different to its own.

  This can be difficult to track down if recursion is involved.

 

One thing you could try is to create an Area in worksheet "A" where want to include worksheet "B".  Then open worksheet "B", copy it in its entirety (ctrl-a), and paste it into the Area in "A".   The collapse the Area.   If there are errors, then the Area boundary should turn red.  But, at least, you'll have a starting point to look for the cause(s).

 

Stuart 

 

YA_10963798
14-Alexandrite
(To:StuartBruff)

That is interesting solution , however the sheet I want to transfer the results from has 40 pages calculation. and I opened new sheet just to make it easier to read instead in adding in the original one. Maybe there is another solution to bring the results from one sheet to another ? Can you help if you know any alternative?

 

Regards

Yusra

Hi, Yusra.

 

Do you still see errors when you include the worksheet in a blank worksheet?  Does your new worksheet have the same ORIGIN  as the one you want to include?

 

Are you sure that there are -- no -- errors, even minor ones, in the original worksheet?  I've had cases where I left an evaluation with an error.  Although the rest of the worksheet was fine, that one error flagged the whole sheet as having errors when I included it.

 

As for making the worksheet easier to read, do as I suggested above:  cut & paste the whole contents into an Area, then collapse the Area.  That means all of the workings will be hidden.  You could even lock the Area to prevent others having access to the Area if you're, say, sending the worksheet to a third-party.

 

The once caveat with Areas, though, is that a Mathcad Prime Area can't include Areas, so you'd have to partition the worksheet into several (collapsed) Areas.

 

Stuart.

YA_10963798
14-Alexandrite
(To:StuartBruff)

I will do that. Thank you 

Announcements

Top Tags