You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Glen Stampoultzis <gs...@iinet.net.au> on 2004/08/18 03:10:06 UTC

Weird continue records

I'm probably on my own with this but I thought I'd throw it out there anyway.

I've got some really strange behavior I noticed with OBJ records.  When you 
have an Excel sheet with a really large number of OBJ records Excel will 
sometimes trail it with a continue record.  The really weird thing is that 
it doesn't seem to be a continuation of the OBJ record.  Take this real 
life example:


OBJ Record:

00000000 15 00 12 00 01 00 4E 00 11 60 00 00 00 00 84 BB ......N..`......
00000010 E8 00 00 00 00 00 00 00 00 00                   ..........

[OBJ]
SUBRECORD: [ftCmo]
     .objectType           = 0x0001 (1 )
     .objectId             = 0x004E (78 )
     .option               = 0x6011 (24593 )
          .locked                   = true
          .printable                = true
          .autofill                 = true
          .autoline                 = true
     .reserved1            = 0x00000000 (0 )
     .reserved2            = 0x00E8BB84 (15252356 )
     .reserved3            = 0x00000000 (0 )
[/ftCmo]
SUBRECORD: [ftEnd]
[/ftEnd]
[/OBJ]

Followed by the continue block below:

00000000 0F 00 04 F0 64 00 00 00 42 01 0A F0 08 00 00 00 ....d...B.......
00000010 4F 04 00 00 00 0A 00 00 73 00 0B F0 2A 00 00 00 O.......s...*...
00000020 BF 00 08 00 08 00 44 01 04 00 00 00 7F 01 00 00 ......D.........
00000030 01 00 BF 01 00 00 10 00 C0 01 40 00 00 08 D1 01 ..........@.....
00000040 01 00 00 00 FF 01 10 00 10 00 00 00 10 F0 12 00 ................
00000050 00 00 00 00 04 00 D0 02 10 00 1E 00 05 00 A0 02 ................
00000060 13 00 5A 00 00 00 11 F0 00 00 00 00             ..Z.........


As you can see the OBJ record is complete (you can tell by the ftEnd).  The 
continue makes no sense in this context.  Unless it's continuing the record 
before the OBJ for some sick reason... hrrm..

Regards,


Glen Stampoultzis
gstamp@iinet.net.au
http://members.iinet.net.au/~gstamp/glen/


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Re: Weird continue records

Posted by Glen Stampoultzis <gs...@iinet.net.au>.
As far as I can tell yes.  It seems that you don't need to present them in 
that format when serializing.  You just need to handle it when decoding 
existing records.

-- Glen

At 12:39 AM 19/08/2004, you wrote:
>Just curious, is that X threshold consistent?  40 minute turnaround time 
>is pretty good for weird stuff like this :)
>
>Glen Stampoultzis wrote:
>
>>Okay... sometimes it helps to say things in public.
>>What happens is this:
>>Usually you get drawing records followed by OBJ record or text object 
>>records repeating for as many shapes as you have in your sheet.  This is 
>>complicated by the fact that the escher records actually form one stream 
>>that is split across those drawing records.  Painful but at least sort of 
>>consistent.
>>It seems that the Excel file format people didn't like this consistency 
>>however. They had this great idea that after writing a certain number of 
>>records this way they should change things and start writing continue 
>>records.  Now the thing with continue records is that they were supposed 
>>to be for continuing records that have grown past the max record size and 
>>they immediately follow the record they are continuing.
>>You've probably guessed by now that the way they're being used for 
>>drawing records does not follow this pattern.  After write X records 
>>Excel will start writing records in the pattern: OBJ -> CONTINUE -> OBJ 
>>-> CONTINUE etc.  One might logically think that the continue record is 
>>continuing the OBJ record but it is actually continuing the very last 
>>drawing record we ran across.
>>Got to love Excel.
>>Regards,
>>Glen
>>At 11:10 AM 18/08/2004, you wrote:
>>
>>>I'm probably on my own with this but I thought I'd throw it out there 
>>>anyway.
>>>
>>>I've got some really strange behavior I noticed with OBJ records.
>>>When you have an Excel sheet with a really large number of OBJ records 
>>>Excel will sometimes trail it with a continue record.  The really weird 
>>>thing is that it doesn't seem to be a continuation of the OBJ 
>>>record.  Take this real life example:
>>>
>>>
>>>OBJ Record:
>>>
>>>00000000 15 00 12 00 01 00 4E 00 11 60 00 00 00 00 84 BB ......N..`......
>>>00000010 E8 00 00 00 00 00 00 00 00 00                   ..........
>>>
>>>[OBJ]
>>>SUBRECORD: [ftCmo]
>>>     .objectType           = 0x0001 (1 )
>>>     .objectId             = 0x004E (78 )
>>>     .option               = 0x6011 (24593 )
>>>          .locked                   = true
>>>          .printable                = true
>>>          .autofill                 = true
>>>          .autoline                 = true
>>>     .reserved1            = 0x00000000 (0 )
>>>     .reserved2            = 0x00E8BB84 (15252356 )
>>>     .reserved3            = 0x00000000 (0 )
>>>[/ftCmo]
>>>SUBRECORD: [ftEnd]
>>>[/ftEnd]
>>>[/OBJ]
>>>
>>>Followed by the continue block below:
>>>
>>>00000000 0F 00 04 F0 64 00 00 00 42 01 0A F0 08 00 00 00 ....d...B.......
>>>00000010 4F 04 00 00 00 0A 00 00 73 00 0B F0 2A 00 00 00 O.......s...*...
>>>00000020 BF 00 08 00 08 00 44 01 04 00 00 00 7F 01 00 00 ......D.........
>>>00000030 01 00 BF 01 00 00 10 00 C0 01 40 00 00 08 D1 01 ..........@.....
>>>00000040 01 00 00 00 FF 01 10 00 10 00 00 00 10 F0 12 00 ................
>>>00000050 00 00 00 00 04 00 D0 02 10 00 1E 00 05 00 A0 02 ................
>>>00000060 13 00 5A 00 00 00 11 F0 00 00 00 00             ..Z.........
>>>
>>>
>>>As you can see the OBJ record is complete (you can tell by the 
>>>ftEnd).  The continue makes no sense in this context.  Unless it's 
>>>continuing the record before the OBJ for some sick reason... hrrm..
>>>
>>>Regards,
>>>
>>>
>>>Glen Stampoultzis
>>>gstamp@iinet.net.au
>>>http://members.iinet.net.au/~gstamp/glen/
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: poi-dev-help@jakarta.apache.org
>>
>>Glen Stampoultzis
>>gstamp@iinet.net.au
>>http://members.iinet.net.au/~gstamp/glen/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: poi-dev-help@jakarta.apache.org
>


Glen Stampoultzis
gstamp@iinet.net.au
http://members.iinet.net.au/~gstamp/glen/

Re: Weird continue records

Posted by Danny Mui <da...@muibros.com>.
Just curious, is that X threshold consistent?  40 minute turnaround time 
is pretty good for weird stuff like this :)

Glen Stampoultzis wrote:

> 
> Okay... sometimes it helps to say things in public.
> 
> What happens is this:
> 
> Usually you get drawing records followed by OBJ record or text object 
> records repeating for as many shapes as you have in your sheet.  This is 
> complicated by the fact that the escher records actually form one stream 
> that is split across those drawing records.  Painful but at least sort 
> of consistent.
> 
> It seems that the Excel file format people didn't like this consistency 
> however. They had this great idea that after writing a certain number of 
> records this way they should change things and start writing continue 
> records.  Now the thing with continue records is that they were supposed 
> to be for continuing records that have grown past the max record size 
> and they immediately follow the record they are continuing.
> 
> You've probably guessed by now that the way they're being used for 
> drawing records does not follow this pattern.  After write X records 
> Excel will start writing records in the pattern: OBJ -> CONTINUE -> OBJ 
> -> CONTINUE etc.  One might logically think that the continue record is 
> continuing the OBJ record but it is actually continuing the very last 
> drawing record we ran across.
> 
> Got to love Excel.
> 
> Regards,
> 
> Glen
> 
> At 11:10 AM 18/08/2004, you wrote:
> 
>> I'm probably on my own with this but I thought I'd throw it out there 
>> anyway.
>>
>> I've got some really strange behavior I noticed with OBJ records.  
>> When you have an Excel sheet with a really large number of OBJ records 
>> Excel will sometimes trail it with a continue record.  The really 
>> weird thing is that it doesn't seem to be a continuation of the OBJ 
>> record.  Take this real life example:
>>
>>
>> OBJ Record:
>>
>> 00000000 15 00 12 00 01 00 4E 00 11 60 00 00 00 00 84 BB ......N..`......
>> 00000010 E8 00 00 00 00 00 00 00 00 00                   ..........
>>
>> [OBJ]
>> SUBRECORD: [ftCmo]
>>     .objectType           = 0x0001 (1 )
>>     .objectId             = 0x004E (78 )
>>     .option               = 0x6011 (24593 )
>>          .locked                   = true
>>          .printable                = true
>>          .autofill                 = true
>>          .autoline                 = true
>>     .reserved1            = 0x00000000 (0 )
>>     .reserved2            = 0x00E8BB84 (15252356 )
>>     .reserved3            = 0x00000000 (0 )
>> [/ftCmo]
>> SUBRECORD: [ftEnd]
>> [/ftEnd]
>> [/OBJ]
>>
>> Followed by the continue block below:
>>
>> 00000000 0F 00 04 F0 64 00 00 00 42 01 0A F0 08 00 00 00 ....d...B.......
>> 00000010 4F 04 00 00 00 0A 00 00 73 00 0B F0 2A 00 00 00 O.......s...*...
>> 00000020 BF 00 08 00 08 00 44 01 04 00 00 00 7F 01 00 00 ......D.........
>> 00000030 01 00 BF 01 00 00 10 00 C0 01 40 00 00 08 D1 01 ..........@.....
>> 00000040 01 00 00 00 FF 01 10 00 10 00 00 00 10 F0 12 00 ................
>> 00000050 00 00 00 00 04 00 D0 02 10 00 1E 00 05 00 A0 02 ................
>> 00000060 13 00 5A 00 00 00 11 F0 00 00 00 00             ..Z.........
>>
>>
>> As you can see the OBJ record is complete (you can tell by the 
>> ftEnd).  The continue makes no sense in this context.  Unless it's 
>> continuing the record before the OBJ for some sick reason... hrrm..
>>
>> Regards,
>>
>>
>> Glen Stampoultzis
>> gstamp@iinet.net.au
>> http://members.iinet.net.au/~gstamp/glen/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: poi-dev-help@jakarta.apache.org
>>
> 
> 
> Glen Stampoultzis
> gstamp@iinet.net.au
> http://members.iinet.net.au/~gstamp/glen/
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Re: Weird continue records

Posted by Rainer Klute <kl...@rainer-klute.de>.
Am Mi, den 18.08.2004 schrieb Glen Stampoultzis um 3:51:
> You've probably guessed by now that the way they're being used for drawing 
> records does not follow this pattern.  After write X records Excel will 
> start writing records in the pattern: OBJ -> CONTINUE -> OBJ -> CONTINUE 
> etc.  One might logically think that the continue record is continuing the 
> OBJ record but it is actually continuing the very last drawing record we 
> ran across.

Weird. At least the good news is that once you know it you can cope with
it. :-)

Best regards
Rainer Klute

                           Rainer Klute IT-Consulting GmbH
  Dipl.-Inform.
  Rainer Klute             E-Mail:  klute@rainer-klute.de
  Körner Grund 24          Telefon: +49 172 2324824
D-44143 Dortmund           Telefax: +49 231 5349423


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Re: Weird continue records

Posted by Glen Stampoultzis <gs...@iinet.net.au>.
Okay... sometimes it helps to say things in public.

What happens is this:

Usually you get drawing records followed by OBJ record or text object 
records repeating for as many shapes as you have in your sheet.  This is 
complicated by the fact that the escher records actually form one stream 
that is split across those drawing records.  Painful but at least sort of 
consistent.

It seems that the Excel file format people didn't like this consistency 
however. They had this great idea that after writing a certain number of 
records this way they should change things and start writing continue 
records.  Now the thing with continue records is that they were supposed to 
be for continuing records that have grown past the max record size and they 
immediately follow the record they are continuing.

You've probably guessed by now that the way they're being used for drawing 
records does not follow this pattern.  After write X records Excel will 
start writing records in the pattern: OBJ -> CONTINUE -> OBJ -> CONTINUE 
etc.  One might logically think that the continue record is continuing the 
OBJ record but it is actually continuing the very last drawing record we 
ran across.

Got to love Excel.

Regards,

Glen

At 11:10 AM 18/08/2004, you wrote:

>I'm probably on my own with this but I thought I'd throw it out there anyway.
>
>I've got some really strange behavior I noticed with OBJ records.  When 
>you have an Excel sheet with a really large number of OBJ records Excel 
>will sometimes trail it with a continue record.  The really weird thing is 
>that it doesn't seem to be a continuation of the OBJ record.  Take this 
>real life example:
>
>
>OBJ Record:
>
>00000000 15 00 12 00 01 00 4E 00 11 60 00 00 00 00 84 BB ......N..`......
>00000010 E8 00 00 00 00 00 00 00 00 00                   ..........
>
>[OBJ]
>SUBRECORD: [ftCmo]
>     .objectType           = 0x0001 (1 )
>     .objectId             = 0x004E (78 )
>     .option               = 0x6011 (24593 )
>          .locked                   = true
>          .printable                = true
>          .autofill                 = true
>          .autoline                 = true
>     .reserved1            = 0x00000000 (0 )
>     .reserved2            = 0x00E8BB84 (15252356 )
>     .reserved3            = 0x00000000 (0 )
>[/ftCmo]
>SUBRECORD: [ftEnd]
>[/ftEnd]
>[/OBJ]
>
>Followed by the continue block below:
>
>00000000 0F 00 04 F0 64 00 00 00 42 01 0A F0 08 00 00 00 ....d...B.......
>00000010 4F 04 00 00 00 0A 00 00 73 00 0B F0 2A 00 00 00 O.......s...*...
>00000020 BF 00 08 00 08 00 44 01 04 00 00 00 7F 01 00 00 ......D.........
>00000030 01 00 BF 01 00 00 10 00 C0 01 40 00 00 08 D1 01 ..........@.....
>00000040 01 00 00 00 FF 01 10 00 10 00 00 00 10 F0 12 00 ................
>00000050 00 00 00 00 04 00 D0 02 10 00 1E 00 05 00 A0 02 ................
>00000060 13 00 5A 00 00 00 11 F0 00 00 00 00             ..Z.........
>
>
>As you can see the OBJ record is complete (you can tell by the 
>ftEnd).  The continue makes no sense in this context.  Unless it's 
>continuing the record before the OBJ for some sick reason... hrrm..
>
>Regards,
>
>
>Glen Stampoultzis
>gstamp@iinet.net.au
>http://members.iinet.net.au/~gstamp/glen/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: poi-dev-help@jakarta.apache.org
>


Glen Stampoultzis
gstamp@iinet.net.au
http://members.iinet.net.au/~gstamp/glen/