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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Need help in restoring the worksheet

VladimirN
24-Ruby II

Need help in restoring the worksheet

Hi,

I tried to restore a worksheet "Document initial" (though it was not created by me), but nothing happened. Tried to add a new line in the file through "Notepad++" program, and also use the old recovery Mathcad worksheet pattern, but there is no result. Perhaps someone has more experience in such cases by repairing of Mathcad worksheets.

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:StuartBruff)

StuartBruff wrote:

Guten Morgen, Werner!

Hmm, it was 13:15 local time when you posted this. How on earth could you have known that I was sleeping that long?

I presume you deleted the incomplete region at the end of the worksheet before adding the missing </regions></worksheet> tags?

No, I had rather added all those missing ending tags.

I'm glad I'm Mathcadless, otherwise I'd be tempted to do it!

Unfortunately I have Mathcad readily available and so I have yielded to the temptation. So attached is the rescued sheet and I guess it really wasn't worth the effort 🙂

The problem was, that when you use a template where changes are made to xy-plot and/or polar plots, Mathcad adds

<plotTemplate>

<polar item-idref="1"/>

<xy item-idref="2"/>

</plotTemplate>

inside the "editor" tags in the settings section and additionally adds two entries in a <binaryContent> section at the end of the file after the <regions> part. As that binaryContent is missing it was necessary to delete that plotTemplate section to make Mathcad happy.

View solution in original post

12 REPLIES 12
StuartBruff
23-Emerald III
(To:VladimirN)

Здравствуйте, Владимир,

I'm Mathcadless until 05 Jan 15, so I can't help much, I'm afraid. However, I've had a look at the file on my Android tablet and it appears as if it's missing at least the final closing tags, as it stops part way through a math region.

It might be worth trying the following:

Open the file with a text editor. Find the tag "<regions>"

Select everything immediately after <regions> until, and including, the last </region> tag.

Copy the selection.

Create a new Normal worksheet in Mathcad and open it in the text editor.

Find the <regions> tag and paste the copied text between the <regions> and </regions> tags.

Save the worksheet and try opening it in Mathcad.

It won't recover all of the original, but it might recover most of what is there.

Stuart

Здравствуйте, Стюарт!

StuartBruff wrote:

... However, I've had a look at the file on my Android tablet and it appears as if it's missing at least the final closing tags, as it stops part way through a math region...

What application you are able to open the Mathcad file in Android OS?

StuartBruff wrote:

... It might be worth trying the following:

Open the file with a text editor. Find the tag "<regions>"

Select everything immediately after <regions> until, and including, the last </region> tag.

Copy the selection.

Create a new Normal worksheet in Mathcad and open it in the text editor.

Find the <regions> tag and paste the copied text between the <regions> and </regions> tags.

Save the worksheet and try opening it in Mathcad...

This trick does not work. The Mathcad file ("New") created in this way can be found in the attachment. When opening this file, I get the following message:

Reason: The name in the end tag of the element must match the element type in the start tag

Line number: 604

Symbol position: 12

But, at the same time, all the tags match - one open (<regions>) and the last to close (</regions>).

Werner_E
25-Diamond I
(To:VladimirN)

But, at the same time, all the tags match - one open (<regions>) and the last to close (</regions>).

I guees the closing area tag is still missing.

When you first posted your file I added all closing tags but then Mathcad threw the error that the file would not be a valid Mathcad XML worksheet. So no success so far. (see attached)

You can create a blank worksheet and copy the regions in the damaged document one by one until Mathcad chokes again. This works but is a tedious task to do and depending on the amount of information missing from the end it even may not be worth the effort.

StuartBruff
23-Emerald III
(To:Werner_E)

Werner Exinger wrote:

But, at the same time, all the tags match - one open (<regions>) and the last to close (</regions>).

I guees the closing area tag is still missing.

When you first posted your file I added all closing tags but then Mathcad threw the error that the file would not be a valid Mathcad XML worksheet. So no success so far. (see attached)

You can create a blank worksheet and copy the regions in the damaged document one by one until Mathcad chokes again. This works but is a tedious task to do and depending on the amount of information missing from the end it even may not be worth the effort.

Guten Morgen, Werner!

I see I'm following in your footsteps this morning! 🙂

I presume you deleted the incomplete region at the end of the worksheet before adding the missing </regions></worksheet> tags?

I suspect you're right about the effort ... It looks simple enough, though, to recreate what's there of the worksheet by hand, if all else fails.

I'm glad I'm Mathcadless, otherwise I'd be tempted to do it!

Stuart

Werner_E
25-Diamond I
(To:StuartBruff)

StuartBruff wrote:

Guten Morgen, Werner!

Hmm, it was 13:15 local time when you posted this. How on earth could you have known that I was sleeping that long?

I presume you deleted the incomplete region at the end of the worksheet before adding the missing </regions></worksheet> tags?

No, I had rather added all those missing ending tags.

I'm glad I'm Mathcadless, otherwise I'd be tempted to do it!

Unfortunately I have Mathcad readily available and so I have yielded to the temptation. So attached is the rescued sheet and I guess it really wasn't worth the effort 🙂

The problem was, that when you use a template where changes are made to xy-plot and/or polar plots, Mathcad adds

<plotTemplate>

<polar item-idref="1"/>

<xy item-idref="2"/>

</plotTemplate>

inside the "editor" tags in the settings section and additionally adds two entries in a <binaryContent> section at the end of the file after the <regions> part. As that binaryContent is missing it was necessary to delete that plotTemplate section to make Mathcad happy.

Danke, Werner! It looks like you have solved this "puzzle".

Werner Exinger wrote:

... Unfortunately I have Mathcad readily available and so I have yielded to the temptation. So attached is the rescued sheet and I guess it really wasn't worth the effort 🙂 ...

I also did not know the contents of the file . But you have added the experience in restoring damaged files, which is also useful .

StuartBruff wrote:

Здравствуйте, Владимир,

I'm Mathcadless until...

Stuart,

I just want to note that you can use SMath Studio cloud service to view regular Mathcad documents on tablet/smartphone: http://smath.info/cloud/

StuartBruff
23-Emerald III
(To:VladimirN)

Спасибо большое за это, Владимир. Это очень полезно знать, и все работало нормально на моем Samsung таблетки.

Стюарт

StuartBruff
23-Emerald III
(To:VladimirN)

Доброе утро, Владимир,

I used the Hancom document viewer that came with my Samsung tablet to view the xmcd file, purely as a text file. I've since downloaded DroidEdit and set it up to display xmcd worksheets as xml files.

The only odd thing I've noticed about your new worksheet is that DroidEdit indents <regions> under </settings> , whereas it doesn't in the original version, nor does it do so in a random xmcd file I've just checked.

A couple of suggestions come to mind ..

1. Create a new blank worksheet and type a couple of equations in (doesn't matter what), then try the previous copy and paste operation.

2. Create a new blank worksheet and copy just one region in from the original worksheet. If that works then, try a laborious binary division (or other division) to see where the error less.

Stuart

Спасибо за информацию, Стюарт.

StuartBruff wrote:

... I've since downloaded DroidEdit and set it up to display xmcd worksheets as xml files...

Now I purchased "DroidEdit Pro (code editor)" version. Do you use any mathematical packages on your tablet? I found interesting the free app which called "Octave". The program is a bit like "MATLAB".

StuartBruff wrote:

... A couple of suggestions come to mind ..

Well, Werner has already solved this "puzzle" .

VladimirN. wrote:

I found interesting the free app which called "Octave". The program is a bit like "MATLAB".

It's more than "a bit," it's a freeware version of MatLab; it will run most MatLab scripts without modification.

Here, we use Scilab, which is a fork of an old version of Matlab.

I was told Scilab was significantly better than Octave, but unlike Octave, some functions are slightly different, or have slightly different name, and it is often necessary to adapt Matlab programs so that they can run in Scilab.

And I don't know for Octave, but Scilab is definitely free and open-source.

Announcements

Top Tags