Menu

#2 getWorkbook method Exception (ProtectRecord class)

open
nobody
5
2006-04-11
2006-04-11
Anonymous
No

When calling getWorkbook method on a protected
workbook (don't know if it also fails on unprotected),
I get this error message:

"Index was outside the bounds of the array. "

I traced the error to this subroutine in the
ProtectRecord class:
internal ProtectRecord(Record t):base
(t)
{
sbyte[] data = getRecord
().Data;

//int protflag =
IntegerHelper.getInt(data[0], data[1]);
int protflag=0; //DWS
hack: the above statement was failing
prot = (protflag == 1);
}

I hacked out the error in my version as a temporary
fix (always returned 0 for the value of protflag).

Discussion


Log in to post a comment.

MongoDB Logo MongoDB