Storing BLOBs in excel files

  • Thread starter Thread starter willem van deursen
  • Start date Start date
W

willem van deursen

Hello group,

(must have been asked before, but I don't seem to find the right google
terms)

Is there a way to store Large Binary Objects in cells? I have a list of
items that I want to associate with documents, such as picture, some
piece of text or HTML. I can not be sure it is text, so I need a way to
store it as binary objects, along with the list of items.

I don't need to be able to manipulate the BLOBs, just store them and
retrieve them.

Any help??

Thanks

Willem
 
Even binary files are in effect text and can be stored as text in cells,
but... The main problem is with characters under chr(14) which screw things
up when dumped to cells. Two approaches -

- Open the file as binary, convert each 0-255 'number' to a two digit Hex
string and build the string. The Hex string will be double the length of the
original file, plus a tad.

- Aim to keep as much as possible as 'characters' but convert the
troublesome ones below 14 (eg add 32 keeping a record of which characters
will later need to be reconverted with -32). This means the overall size
will not be much larger than the original file size (bit more work though)

With both approaches the resulting strings will need to be split into chunks
of 32k or less (if applicable) to fit into cells, again a bit more in the
way of record keeping.

Regards,
Peter T
 
Thanks Peter, that seems to be the way to go. It does involve some pre-
and postprocessing, and I was hoping to avoid that!

Willem
 
Back
Top