Skip to main content
24-Ruby III
December 25, 2014
Solved

Need help in restoring the worksheet

  • December 25, 2014
  • 2 replies
  • 4237 views

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.

Best answer by Werner_E

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.

2 replies

23-Emerald V
December 26, 2014

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

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

VladimirN24-Ruby IIIAuthor
24-Ruby III
December 27, 2014

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

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>).

25-Diamond I
December 28, 2014

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.

23-Emerald V
December 28, 2014

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

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

VladimirN24-Ruby IIIAuthor
24-Ruby III
January 1, 2015

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

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" .

23-Emerald I
January 2, 2015

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.