Re: BIFF loader source

On Mon, Jan 14, 2002 at 08:34:34PM +0000, Michael Meeks wrote:
      a) The ms-biff.h of the current excel plugin provides a
         relatively abstract stream API already, that should easily
         cope with a native biff stream rather than one coming from
         an ole2 file.

I had an alternate tree where I did this. It is possible, but it's a
kludge because the parts of the OLE2 structures needed to do this are
marked as non-public and so could presumably be deprecated or removed
in future versions.

Feel free to convert the plugin back to an ms-biff style interface,
it isn't hard but you should make sure that the libole2 code remarks
that these structures, while private, cannot be removed/ renamed or
otherwise altered in future versions.

      b) Given the above, it appears that you have cut and pasted, a
         truly vast chunk of code, and then made various changes,
         often switching on the biff version number (which was
         intended to allow this all to be written as a single chunk
         without code duplication in the first place).

I asked the list for permission to do so because I felt, after having
actually investigated this matter, that it was the safest thing to do.

      So - really, the changes need to be re-integrated into the main excel
plugin, which should be fairly trivial. Then another ms-excel-stream
implementation needs to be written. Possibly the easiest way to do this
is by writing a MsOleStream impl. for a plain biff file - since it's all
virtualized at that level anyway.

Yes, this sounds nice in theory, but I have actually *tried* it and it
didn't work very well.

I genuinely wrote an MsOleStream implementation, bolted the ms-biff code
into it, fought with all the places where the "modern" Excel code wrongly
assumes that BIFF versions don't matter, and then found that I couldn't
even begin to load anything older than Excel 4.0 this way, because the
main code structure thinks in terms of workbooks...

I also disagree with the practice of ignoring BIFF token version numbers
but that's another story and not something that would have prevented me
from sharing code if it had been more practical.

So, a lot is the same (I stole it) and a lot is different (I threw it
away or I rewrote it). The resulting code works, but it could be a lot
prettier. It won't get improved while it's sitting untried on my hard
disk though, and I am very busy right now.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]