Bug 32903 - XBAT Structure differs from documentation
Summary: XBAT Structure differs from documentation
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: POIFS (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-31 15:04 UTC by Stefan Schm
Modified: 2011-02-25 17:14 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Schm 2004-12-31 15:04:28 UTC
I created a quite simple but large EXCEL-File with EXCEL2000 with a size of 
about 35MB.  This file uses 4 XBAT-Blocks.
When building the BAT-array from these XBAT-blocks I encountered a problem ( 
which arose the moment more then 1 XBAT-Blocks was needed ).
It seems as if not all 128 integers in the block were holding indices of BAT-
blocks but only the first 127 of them.  The last integer ( at offset +1FC ) 
pointed to the next XBAT-Block.   The same was true for the other XBAT-blocks 
as well.
Thus the last integers of all XBAT-blocks formed a chain just like the one 
found in the BAT-Array with the last XBAT-Block having -2 as end-indicator 
while the other integers of all these blocks formed the extension of the BAT-
Array.

Can anyone confirm the behavior mentionend above or is this an error on my 
side?

If the previous were true, then the XBAT-Blocks would not necessarily have to 
be located in sequence as described in the documentation here

http://jakarta.apache.org/poi/poifs/fileformat.html

and the BAT-Array is only extended by 127 of the 128 integers of each XBAT-
block.


If needed I can submit a zipped version of the file indicated ( still 5MB 
size ) but I guess any file large enough created by EXCEL will do.

live long and prosper
Stefan Schmöcker
Comment 1 Nick Burch 2011-02-25 17:14:09 UTC
I suspect you figured out the answer about 6 years ago, but in case anyone stumbles across this...

The XBAT holds 128 offsets. The first 127 are the offsets to BAT blocks, while the 128th is the offset to the next XBAT in the chain. I've fixed the documentation, and added a link to [MS-CFB].pdf which is the now-public Microsoft documentation on all this.