Page 1 of 1

Excel TM1 Undo Level

Posted: Wed Feb 23, 2011 10:54 pm
by liandoje
Hi forum

When I use Excel with TM1 addin, I can only undo for one level. However, when using standalone-Excel the undo function are more than 10 levels. Is there anyone experiencing this?

Regards
jeffry

Re: Excel TM1 Undo Level

Posted: Wed Feb 23, 2011 11:22 pm
by Alan Kirk
liandoje wrote:Hi forum

When I use Excel with TM1 addin, I can only undo for one level. However, when using standalone-Excel the undo function are more than 10 levels. Is there anyone experiencing this?

Regards
jeffry
Welcome to the Forum, but please take the time to read the various guidelines before posting. This, for example, does not meet the requirements for a bug post as outlined in the sticky post at the top of that forum. It's been moved to the TM1 forum accordingly.

The problem that you've mentioned appears (in my experience) to apply when your action affects only a single cell. (This is based on XP/2003; I rarely use Excel 2007 with TM1. Indeed, I rarely use Excel 2007 unless someone has a gun to my head. However I won't be surprised if it applies to 2007/2010 as well.)

For example, if you type a character into cell A1 and then another one into cell B1, the only undo you'll have with TM1p.xla loaded is for the B1 entry. However, if you select the range A1 to A3 and type something, then press [Ctrl]+[Enter] to fill all of the cells in that range, then do the same in B1 to B3, you'll be able to undo both actions. The same sort of limitation also applies to pasting, whether that pasting is of values or formatting; if your target is a single cell, you will have only a single undo. If you paste a range, you'll have the normal number of undos. (Applying formatting directly to a cell seems to give the usual number of undos, but that doesn't change its value.)

I believe that this is an unfortunate side effect from the way that TM1 needs to take over the relevant change event of the worksheet to enable the writeback functionality of DBR/DBRW functions. In short, TM1 has to intercept the change to a single cell so that if the cell contains a DBRW formula, it goes up to the cube (following which the formula is restored) rather than simply going into the cell and obliterating the formula. In the process of doing this, however, the Undo chain is lost. This may not necessarily be a bug; it may be simply unavoidable because of the way the action is done. It would involve intermediate changes to the contents of the cell (from formula to value and back to formula again) which would also normally appear in the undo stack. In short, TM1 may need to dump the undo stack to make sure that you don't corrupt your workbook by back-stepping into one of the steps that it was doing to send the value up to the cube.

Since you can use the native DBRW functionality to punch only a single figure in at a time, it isn't an issue when you change a range of cells at once and you therefore retain the standard Undo list in that case.

Re: Excel TM1 Undo Level

Posted: Thu Feb 24, 2011 12:29 am
by liandoje
Hi Alan

My apology for wrongly classifying the forum topic. I tought this is a bug.
Thank you very much for you explanation. This is really a big enlightenment for me in understanding the undo action in TM1.
The target of a single cell is the source of problem.

Cheers
jeffry

Re: Excel TM1 Undo Level

Posted: Fri Sep 30, 2011 3:20 pm
by Catherine
Hi,

I've just gone through your post, searching for answers to another question...

I met exactly the same "problem" a year ago. IBM said it is not a bug, and gave me the following explanation:

"The macros of the TM1 Excel Add-In (bin/tm1p.xla) do intercept events
in Excel, and for some events, replace the standard Excel operation
with a customized operation. As there is no free lunch, a price has to
be paid for the new, non-standard Excel features of the TM1 Excel
Add-In. Event triggered macro programming does have a couple of
unfortunate side effects. One of them it disables the standard Excel
multi level undo stack. Thus a developer has to use the VBA function
Application.OnUndo which will allow the developer to provide his own
code for an undo routine - but just for one level, that being the last
action/operation."

Re: Excel TM1 Undo Level

Posted: Sun Oct 02, 2011 8:11 pm
by lotsaram
Breaking of undo/redo is a common complaint from users. 99% of the time it comes up when users are performing a copy/paste from a single cell. Generally it's not too difficult to train users to select 2 cells or a larger range before copying.