You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "Height, Jason" <JH...@subcorp.com.au> on 2003/01/29 22:46:22 UTC

DBCell & Index .. Ouch!

Ok

 

Here are my troubles with implementing the DBCell and Index records
correctly in HSSF. I was wondering if I am missing something.

 

I was going to simply implement this functionality within the
RowRecordAggregate, however this cannot be done because:

 

1: The offsets to DBCell records from the Index record are relative to the
first Workbook BOF record. Of the two simple workbooks from excel that I
have run through the BOF record was at position 0, but I assume that this is
not always the case (pg 441 of Excel97 Dev Kit gives an example where the
BOF is not 0). In anycase the location of the BOF record is not accessible
from the RowRecordAggregate, but would be in the Workbook class. Is this
just a misprint, is it really possible for the workbook BOF to not be the
first record and therefore at offset 0?

 

2: The DBCell record references the first cell from a row and of course cell
references are also not available in the RowRecordsAggregate.

 

So it appears that the Sheet.serialize(int offset, byte[] data) is about to
get more complex, my only problem is how to locate the Workbook BOF from a
Sheet? I don't think that this can be done at the moment (there is not
Workbook reference from a sheet), so I think that the createSheet will need
to be supplied a reference to the Workbook so it can traverse the Workbook
records until it finds the BOF.

 

Any other comments appreciated.

 

Thanks

 

Jason

 

 

--------------------------------------------------------------------------------------------------------------------
This e-mail (including attachments) is confidential information of Australian Submarine Corporation Pty Limited (ASC).  It may also be legally privileged.  Unauthorised use and disclosure is prohibited.  ASC is not taken to have waived confidentiality or privilege if this e-mail was sent to you in error. If you have received it in error, please notify the sender promptly.  While ASC takes steps to identify and eliminate viruses, it cannot confirm that this e-mail is free from them.  You should scan this e-mail for viruses before it is used.  The statements in this e-mail are those of the sender only, unless specifically stated to be those of ASC by someone with authority to do so.