You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Christoph Jaeger <ch...@dhl.com> on 2003/12/02 18:02:47 UTC
Including images in Excel sheet
Hi,
Is there a way of including an image into an Excel sheet created with
POI? I want to create a sheet including a bar code (I will probably be
able to create a GIF or PNG or PDF image of the bar code to be used).
The sheet will be printed and the bar code scanned with a bar code
scanner later.
Also, if someone has a hint for me for a java class, which can create
this bar code (I do not care too much about which type of code, as long
as an ordinary scanner can read it), I would be glad to hear it.
Thanks a lot,
Best Regards,
Christoph Jäger
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
Re: Blank cell with a style (e.g Bold/Italic)
Posted by Rommel Sharma <ro...@mahindrabt.com>.
Hi,
I am doing an Excel sheet validation in which I have to ignore the last rows
that have no data.
I am doing a check for blank cells programatically, but the test fails when
I encounter a cell, that has no visible data or whitespace but has been
given a style like bold or italic. (A row with no data, but someone selects
a few cells and aplies italics or bold style to it without writing any data
into the cells)
My question: How do I know if a cell has any such style applied to it and is
blank at the same time?
(Also, I do not want to affect other cells that may have valid data and have
a style applied to them.)
Thanks,
Rommel.
**************************************************************
Scanned by eScan Content-Security and Anti-Virus Software.
Visit http://www.mwti.net for more info on eScan and MailScan.
**************************************************************
*********************************************************
Disclaimer
This message (including any attachments) contains
confidential information intended for a specific
individual and purpose, and is protected by law.
If you are not the intended recipient, you should
delete this message and are hereby notified that
any disclosure, copying, or distribution of this
message, or the taking of any action based on it,
is strictly prohibited.
*********************************************************
Visit us at http://www.mahindrabt.com
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
Re: Including images in Excel sheet
Posted by "Andrew C. Oliver" <ac...@apache.org>.
I can vouch that Formula 1 works if you want to pay a lot, though the
graphics didn't work last time I checked. However, we're adding graphics
support to POI we'll just have to decide whether to:
1. commit it to 2.0 possibly delaying the release even more
2. make a 2.5
3. commit to 3.0 making it take a good while before it will be in a prod
release.
4. ???
I am in the second camp with lazy leanings towards the first.
Now this won't give you GIF/JPG/whatever, but I'm sure a client will fund
that development before long and it won't be particularly hard to do.
Adding the feature to POI will still probably be cheaper than deploying
Formula 1 on any serious system so it should be an easy sell.
AFAIK, JXReports uses POI.
No clue on ExcelWriter.
-Andy
On 12/8/03 7:47 PM, "Michael Zalewski" <za...@optonline.net> wrote:
> If you mean 'freeware', I don't think there is a solution. You can start
> with a template that contains all the pictures, then use POI to add cell
> data and formulas. But you cannot use the existing API to insert new
> pictures, or to access or modify the existing pictures.
>
> If you are willing to pay for commercial software, there are a few
> solutions:
>
> Formula One e.Spreadsheet Engine
> http://www.reportingengines.com/products/espreadengine/overview.jsp
>
> JXReports
> http://www.jxreports.com
>
> SoftArtisans ExcelWriter
> http://officewriter.softartisans.com/default.aspx?PageID=67
>
> The latest versions of these products seem to support Excel charts as well
> as images. I haven't actually used any of these products, (other than
> looking at the demos), so I can't say how well they work.
>
>
--
Andrew C. Oliver
http://www.superlinksoftware.com/poi.jsp
Custom enhancements and Commercial Implementation for Jakarta POI
http://jakarta.apache.org/poi
For Java and Excel, Got POI?
The views expressed in this email are those of the author and are almost
definitely not shared by the Apache Software Foundation, its board or its
general membership. In fact they probably most definitively disagree with
everything espoused in the above email.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
RE: Including images in Excel sheet
Posted by Michael Zalewski <za...@optonline.net>.
If you mean 'freeware', I don't think there is a solution. You can start
with a template that contains all the pictures, then use POI to add cell
data and formulas. But you cannot use the existing API to insert new
pictures, or to access or modify the existing pictures.
If you are willing to pay for commercial software, there are a few
solutions:
Formula One e.Spreadsheet Engine
http://www.reportingengines.com/products/espreadengine/overview.jsp
JXReports
http://www.jxreports.com
SoftArtisans ExcelWriter
http://officewriter.softartisans.com/default.aspx?PageID=67
The latest versions of these products seem to support Excel charts as well
as images. I haven't actually used any of these products, (other than
looking at the demos), so I can't say how well they work.
-----Original Message-----
From: pg.delivery@patni.com [mailto:pg.delivery@patni.com]
Sent: Monday, December 08, 2003 10:34 AM
To: POI Users List
Subject: Re: Including images in Excel sheet
Hello,
We urgently need some way to insert images JPEG, GIF.. in an excel file.
Is there any other way or any other API in java supporting this?
thanks in advance,
regards
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
Re: Including images in Excel sheet
Posted by pg...@patni.com.
Hello,
We urgently need some way to insert images JPEG, GIF.. in an excel file.
Is there any other way or any other API in java supporting this?
thanks in advance,
regards
----- Original Message -----
From: "Michael Zalewski" <za...@optonline.net>
To: "POI Users List" <po...@jakarta.apache.org>
Sent: Thursday, December 04, 2003 6:39 PM
Subject: RE: Including images in Excel sheet
> How interesting. Thanks for your reply. What you said makes sense and I
> don't know why I missed it (the OBJ record) so many times.
>
> (My copy of the Excel Developers guide is electronic, and in HTML. The
page
> that describes the OBJ record is mysteriously truncated). But there is
> enough there to interpret:
>
> >-BEGIN DUMP---------------------------------
> >00000000 15 00 12 00 08 00 01 00 11 60 00 00 00 00 00 07 .........`......
> >00000010 DC 00 00 00 00 00 07 00 02 00 FF FF 08 00 02 00 ................
> >00000020 01 00 00 00 00 00 ......
>
> 15 00 = sub type 0x15, Common Object Data
> 12 00 = length 18 bytes
> 08 00 = Object Type 0008 (Picture)
> 01 00 = Object ID 0001
> 60 11 = Object Flags (Auto-Line, Auto-Fill, Printable, Locked)
> 00 00 00 00 00 07 DC 00 00 00 00 00 = should be 0 according to Excel 97
> developers guide
>
> 07 00 = sub type 0x07, Clipboard Format
> 02 00 = length 2 bytes
> FF FF = private format
>
> 08 00 = sub type 0x08, Picture Option Flags
> 02 00 = length 2 bytes
> 01 00 = Flags (?) Excel 97 Developers Guide says reserved
>
> 00 00 = sub type 0x00, End
> 00 00 = length 0 bytes
>
> The first sub record makes particular sense, because Excel shows a name of
> 'Picture 1' when the picture is selected. None of the stuff inside the
> Escher objects corresponded to this, especially when you add, group, and
> delete objects.
>
> So there are still some small details I don't understand - What is the
> meaning of Flags in sub type 08, What is the meaning of the 07 DC bytes in
> the Common sub type which should be all 00 according to the developer's
> guide.
>
> About submitting my stuff as a patch: I would except for these things:
>
> 1) According to my reading of this list, a committer is working on it, and
> will be released soon.
>
> 2) It's *way* more than just a patch. Nearly 50 new classes in an entirely
> new package, plus a dozen or so changed and new classes inside HSSF. And
> almost as many Junit test cases.
>
> 3) Even so, it isn't really integrated with HSSF, because of the problems
I
> am having with using RecordFactory. The drawing structure is split across
> many BIFF records, which are not necessarily contiguous. RecordFactory
> builds separate objects for each BIFF record (unless it's a CONTINUE
record,
> which is never used in these drawing records as far as I know).
>
> So how can you implement an MsoDrawingRecord object? RecordFactory will
> return a List of objects, but each MsoDrawing object will only have one
> branch of the tree. To alter the drawing structure, you need to walk the
> entire tree. For example, when you create new objects, a new Shape ID is
> created, whose value depends on Shape Ids already assigned. When you Group
> or Ungroup objects, you collapse or split nodes in the tree.
>
> I suppose the best way would be to add some class to WorkSheet, which
would
> scan the List returned by RecordFactory, and assemble all the drawing
> records into one structure that can be manipulated. Or just hack up
> RecordFactory to treat the drawing records somehow similar to the CONTINUE
> records.
>
> I chose instead to wait and see how this was actually to be implemented by
> the committers.
>
> The only thing my package does do that is somewhat useful are the
extensions
> to BiffViewer, which produce output of the drawing records in a indented
> format which corresponds to the hierarchy, like I showed in my original
> message below. The package understands a good chunk of the record types,
> such as lines and arrows, rectangles and ovals, autoshapes, call-out
> diagrams, 3 D objects, connectors, etc. It also understands how to group
and
> ungroup. I haven't tried yet, but I believe it would extend easily to work
> with Power Point.
>
> -----Original Message-----
> From: Glen Stampoultzis [mailto:gstamp@iinet.net.au]
> Sent: Wednesday, December 03, 2003 10:35 PM
> To: POI Users List
> Subject: RE: Including images in Excel sheet
>
> At 01:11 PM 4/12/2003, you wrote:
> >I am curious if you have deciphered the meaning of the 0x5d BIFF record
> that
> >occurs between MSODRAWING records. It does not seem to be an anchor. If
you
> >know, I would appreciate comments.
> >
> >Here is an example from my enhanced version of BiffViewer.
> >
> >============================================
> >Offset 0x1044 (4164)
> >rectype = 0xec, recsize = 0xdc
> >-BEGIN DUMP---------------------------------
> >00000000 0F 00 02 F0 D4 00 00 00 10 00 08 F0 08 00 00 00 ................
> >00000010 02 00 00 00 01 04 00 00 0F 00 03 F0 BC 00 00 00 ................
> >00000020 0F 00 04 F0 28 00 00 00 01 00 09 F0 10 00 00 00 ....(...........
> >00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> >00000040 02 00 0A F0 08 00 00 00 00 04 00 00 05 00 00 00 ................
> >00000050 0F 00 04 F0 84 00 00 00 B2 04 0A F0 08 00 00 00 ................
> >00000060 01 04 00 00 00 0A 00 00 43 00 0B F0 4A 00 00 00 ........C...J...
> >00000070 04 41 01 00 00 00 05 C1 32 00 00 00 BF 01 00 00 .A......2.......
> >00000080 01 00 BF 03 00 00 08 00 44 00 3A 00 5C 00 42 00 ........D.:.\.B.
> >00000090 41 00 53 00 49 00 53 00 5C 00 47 00 4D 00 4C 00 A.S.I.S.\.G.M.L.
> >000000A0 5C 00 46 00 4D 00 55 00 5F 00 47 00 30 00 31 00 \.F.M.U._.G.0.1.
> >000000B0 2E 00 42 00 4D 00 50 00 00 00 00 00 10 F0 12 00 ..B.M.P.........
> >000000C0 00 00 02 00 00 00 00 00 00 00 00 00 04 00 40 00 ..............@.
> >000000D0 10 00 5A 00 00 00 11 F0 00 00 00 00 ..Z.........
> >-END DUMP-----------------------------------
> >recordid = 0xec, size =220
> > [MSODRAWING]
> >Drawing Container n=0
> > Drawing Atom v=0 (f008) Drawing ID=1
> > Number of Shapes: 2
> > Last Assigned Shape ID: 1:1
> > Shape Group Container (f003) n=0
> > Shape Container n=0
> > DrawingShapeGroup Atom v=1 n=0
> > Boundary: (0,0)-(0,0)
> > Shape v=2 (f00a) Primitive
> > ShapeId: 1:0
> > Flags: Group, Patriarch
> > Shape Container n=0
> > Shape v=2 (f00a) Picture Frame
> > ShapeId: 1:1
> > Flags: Anchored, Has Property
> > Property Table Atom (f00b) v=3, 4 properties
> > Property Table
> > BLIP (260): 1
> > BLIP File Name (261): D:\IMAGES\FMU_G01.BMP
> > [f]Fill Flags (447): 65536
> > Unknown Property (959): 524288
> > Client Anchor Atom v=0 (f010) n=0
> > Binary Data
> > 02 00 00 00 00 00 00 00 00 00 04 00 40 00 10 00
> > 5A 00
> >[/MSODRAWING]
> >
> >============================================
> >Offset 0x1124 (4388)
> >rectype = 0x5d, recsize = 0x26
> >-BEGIN DUMP---------------------------------
> >00000000 15 00 12 00 08 00 01 00 11 60 00 00 00 00 00 07 .........`......
> >00000010 DC 00 00 00 00 00 07 00 02 00 FF FF 08 00 02 00 ................
> >00000020 01 00 00 00 00 00 ......
> >-END DUMP-----------------------------------
> >recordid = 0x5d, size =38
> >[UNKNOWN RECORD:5d]
> > .id = 5d
> >[/UNKNOWN RECORD]
> >
> >The Client Anchor Atom above is the anchor which describes how the
drawing
> >is positioned, and is interpreted outside of the Escher object. The 0x5d
> >record follows immediately, and I haven't got a clue about how to build
it.
>
> That an OBJ record. The Excel 97 Developers Guide describes how to create
> this record.
>
> >Also, how does your library deal with the MSODRAWING records, which are
> >scattered throughout the worksheet? Neither MSODRAWING nor
MSODRAWINGGROUP
> >uses CONTINUE records like the rest of Excel.
>
> This puzzled me for a long time. I ended up aggregating them together
> before attempting to decode the hierarchy. When serializing them back out
> again I had to be careful to chop the hierarchy back up at the right
spots.
>
> >I too had (actually have) a package that does drawings. The drawing part
> >(contents of MSODRAWING and MSODRAWINGGROUP records) are completely
worked
> >out, except for these unknown BIF records, and the compression of BLIP
> >structures. I can build the Escher side of the MSODRAWING structure with
> >various kinds of shapes and properties, including PNG images
> (uncompressed).
>
> I've implemented BLIP compression and decompression (it's not too
> hard). What I haven't done is provide a high level API for that bit yet.
>
> >However, I also cannot release just yet. I'm not even a committer. And I
> >thought the committers were about to release something, so I stopped work
> on
> >the Excel interface. My main interest was getting it to work with
Microsoft
> >Project.
>
> I'm a committer was planning on releasing this sooner but unfortunately
> it's paid work and the payment hasn't been finalized yet.
>
> You don't need to be a committer to develop POI. Just submit a patch and
> if everything is okay one of the committers will load it into CVS for you.
>
> The stuff I have is a little bit tied to Excel but could be made more
> generic without too much effort.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
RE: Including images in Excel sheet
Posted by Michael Zalewski <za...@optonline.net>.
How interesting. Thanks for your reply. What you said makes sense and I
don't know why I missed it (the OBJ record) so many times.
(My copy of the Excel Developers guide is electronic, and in HTML. The page
that describes the OBJ record is mysteriously truncated). But there is
enough there to interpret:
>-BEGIN DUMP---------------------------------
>00000000 15 00 12 00 08 00 01 00 11 60 00 00 00 00 00 07 .........`......
>00000010 DC 00 00 00 00 00 07 00 02 00 FF FF 08 00 02 00 ................
>00000020 01 00 00 00 00 00 ......
15 00 = sub type 0x15, Common Object Data
12 00 = length 18 bytes
08 00 = Object Type 0008 (Picture)
01 00 = Object ID 0001
60 11 = Object Flags (Auto-Line, Auto-Fill, Printable, Locked)
00 00 00 00 00 07 DC 00 00 00 00 00 = should be 0 according to Excel 97
developers guide
07 00 = sub type 0x07, Clipboard Format
02 00 = length 2 bytes
FF FF = private format
08 00 = sub type 0x08, Picture Option Flags
02 00 = length 2 bytes
01 00 = Flags (?) Excel 97 Developers Guide says reserved
00 00 = sub type 0x00, End
00 00 = length 0 bytes
The first sub record makes particular sense, because Excel shows a name of
'Picture 1' when the picture is selected. None of the stuff inside the
Escher objects corresponded to this, especially when you add, group, and
delete objects.
So there are still some small details I don't understand - What is the
meaning of Flags in sub type 08, What is the meaning of the 07 DC bytes in
the Common sub type which should be all 00 according to the developer's
guide.
About submitting my stuff as a patch: I would except for these things:
1) According to my reading of this list, a committer is working on it, and
will be released soon.
2) It's *way* more than just a patch. Nearly 50 new classes in an entirely
new package, plus a dozen or so changed and new classes inside HSSF. And
almost as many Junit test cases.
3) Even so, it isn't really integrated with HSSF, because of the problems I
am having with using RecordFactory. The drawing structure is split across
many BIFF records, which are not necessarily contiguous. RecordFactory
builds separate objects for each BIFF record (unless it's a CONTINUE record,
which is never used in these drawing records as far as I know).
So how can you implement an MsoDrawingRecord object? RecordFactory will
return a List of objects, but each MsoDrawing object will only have one
branch of the tree. To alter the drawing structure, you need to walk the
entire tree. For example, when you create new objects, a new Shape ID is
created, whose value depends on Shape Ids already assigned. When you Group
or Ungroup objects, you collapse or split nodes in the tree.
I suppose the best way would be to add some class to WorkSheet, which would
scan the List returned by RecordFactory, and assemble all the drawing
records into one structure that can be manipulated. Or just hack up
RecordFactory to treat the drawing records somehow similar to the CONTINUE
records.
I chose instead to wait and see how this was actually to be implemented by
the committers.
The only thing my package does do that is somewhat useful are the extensions
to BiffViewer, which produce output of the drawing records in a indented
format which corresponds to the hierarchy, like I showed in my original
message below. The package understands a good chunk of the record types,
such as lines and arrows, rectangles and ovals, autoshapes, call-out
diagrams, 3 D objects, connectors, etc. It also understands how to group and
ungroup. I haven't tried yet, but I believe it would extend easily to work
with Power Point.
-----Original Message-----
From: Glen Stampoultzis [mailto:gstamp@iinet.net.au]
Sent: Wednesday, December 03, 2003 10:35 PM
To: POI Users List
Subject: RE: Including images in Excel sheet
At 01:11 PM 4/12/2003, you wrote:
>I am curious if you have deciphered the meaning of the 0x5d BIFF record
that
>occurs between MSODRAWING records. It does not seem to be an anchor. If you
>know, I would appreciate comments.
>
>Here is an example from my enhanced version of BiffViewer.
>
>============================================
>Offset 0x1044 (4164)
>rectype = 0xec, recsize = 0xdc
>-BEGIN DUMP---------------------------------
>00000000 0F 00 02 F0 D4 00 00 00 10 00 08 F0 08 00 00 00 ................
>00000010 02 00 00 00 01 04 00 00 0F 00 03 F0 BC 00 00 00 ................
>00000020 0F 00 04 F0 28 00 00 00 01 00 09 F0 10 00 00 00 ....(...........
>00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>00000040 02 00 0A F0 08 00 00 00 00 04 00 00 05 00 00 00 ................
>00000050 0F 00 04 F0 84 00 00 00 B2 04 0A F0 08 00 00 00 ................
>00000060 01 04 00 00 00 0A 00 00 43 00 0B F0 4A 00 00 00 ........C...J...
>00000070 04 41 01 00 00 00 05 C1 32 00 00 00 BF 01 00 00 .A......2.......
>00000080 01 00 BF 03 00 00 08 00 44 00 3A 00 5C 00 42 00 ........D.:.\.B.
>00000090 41 00 53 00 49 00 53 00 5C 00 47 00 4D 00 4C 00 A.S.I.S.\.G.M.L.
>000000A0 5C 00 46 00 4D 00 55 00 5F 00 47 00 30 00 31 00 \.F.M.U._.G.0.1.
>000000B0 2E 00 42 00 4D 00 50 00 00 00 00 00 10 F0 12 00 ..B.M.P.........
>000000C0 00 00 02 00 00 00 00 00 00 00 00 00 04 00 40 00 ..............@.
>000000D0 10 00 5A 00 00 00 11 F0 00 00 00 00 ..Z.........
>-END DUMP-----------------------------------
>recordid = 0xec, size =220
> [MSODRAWING]
>Drawing Container n=0
> Drawing Atom v=0 (f008) Drawing ID=1
> Number of Shapes: 2
> Last Assigned Shape ID: 1:1
> Shape Group Container (f003) n=0
> Shape Container n=0
> DrawingShapeGroup Atom v=1 n=0
> Boundary: (0,0)-(0,0)
> Shape v=2 (f00a) Primitive
> ShapeId: 1:0
> Flags: Group, Patriarch
> Shape Container n=0
> Shape v=2 (f00a) Picture Frame
> ShapeId: 1:1
> Flags: Anchored, Has Property
> Property Table Atom (f00b) v=3, 4 properties
> Property Table
> BLIP (260): 1
> BLIP File Name (261): D:\IMAGES\FMU_G01.BMP
> [f]Fill Flags (447): 65536
> Unknown Property (959): 524288
> Client Anchor Atom v=0 (f010) n=0
> Binary Data
> 02 00 00 00 00 00 00 00 00 00 04 00 40 00 10 00
> 5A 00
>[/MSODRAWING]
>
>============================================
>Offset 0x1124 (4388)
>rectype = 0x5d, recsize = 0x26
>-BEGIN DUMP---------------------------------
>00000000 15 00 12 00 08 00 01 00 11 60 00 00 00 00 00 07 .........`......
>00000010 DC 00 00 00 00 00 07 00 02 00 FF FF 08 00 02 00 ................
>00000020 01 00 00 00 00 00 ......
>-END DUMP-----------------------------------
>recordid = 0x5d, size =38
>[UNKNOWN RECORD:5d]
> .id = 5d
>[/UNKNOWN RECORD]
>
>The Client Anchor Atom above is the anchor which describes how the drawing
>is positioned, and is interpreted outside of the Escher object. The 0x5d
>record follows immediately, and I haven't got a clue about how to build it.
That an OBJ record. The Excel 97 Developers Guide describes how to create
this record.
>Also, how does your library deal with the MSODRAWING records, which are
>scattered throughout the worksheet? Neither MSODRAWING nor MSODRAWINGGROUP
>uses CONTINUE records like the rest of Excel.
This puzzled me for a long time. I ended up aggregating them together
before attempting to decode the hierarchy. When serializing them back out
again I had to be careful to chop the hierarchy back up at the right spots.
>I too had (actually have) a package that does drawings. The drawing part
>(contents of MSODRAWING and MSODRAWINGGROUP records) are completely worked
>out, except for these unknown BIF records, and the compression of BLIP
>structures. I can build the Escher side of the MSODRAWING structure with
>various kinds of shapes and properties, including PNG images
(uncompressed).
I've implemented BLIP compression and decompression (it's not too
hard). What I haven't done is provide a high level API for that bit yet.
>However, I also cannot release just yet. I'm not even a committer. And I
>thought the committers were about to release something, so I stopped work
on
>the Excel interface. My main interest was getting it to work with Microsoft
>Project.
I'm a committer was planning on releasing this sooner but unfortunately
it's paid work and the payment hasn't been finalized yet.
You don't need to be a committer to develop POI. Just submit a patch and
if everything is okay one of the committers will load it into CVS for you.
The stuff I have is a little bit tied to Excel but could be made more
generic without too much effort.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
RE: Including images in Excel sheet
Posted by Glen Stampoultzis <gs...@iinet.net.au>.
At 01:11 PM 4/12/2003, you wrote:
>I am curious if you have deciphered the meaning of the 0x5d BIFF record that
>occurs between MSODRAWING records. It does not seem to be an anchor. If you
>know, I would appreciate comments.
>
>Here is an example from my enhanced version of BiffViewer.
>
>============================================
>Offset 0x1044 (4164)
>rectype = 0xec, recsize = 0xdc
>-BEGIN DUMP---------------------------------
>00000000 0F 00 02 F0 D4 00 00 00 10 00 08 F0 08 00 00 00 ................
>00000010 02 00 00 00 01 04 00 00 0F 00 03 F0 BC 00 00 00 ................
>00000020 0F 00 04 F0 28 00 00 00 01 00 09 F0 10 00 00 00 ....(...........
>00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>00000040 02 00 0A F0 08 00 00 00 00 04 00 00 05 00 00 00 ................
>00000050 0F 00 04 F0 84 00 00 00 B2 04 0A F0 08 00 00 00 ................
>00000060 01 04 00 00 00 0A 00 00 43 00 0B F0 4A 00 00 00 ........C...J...
>00000070 04 41 01 00 00 00 05 C1 32 00 00 00 BF 01 00 00 .A......2.......
>00000080 01 00 BF 03 00 00 08 00 44 00 3A 00 5C 00 42 00 ........D.:.\.B.
>00000090 41 00 53 00 49 00 53 00 5C 00 47 00 4D 00 4C 00 A.S.I.S.\.G.M.L.
>000000A0 5C 00 46 00 4D 00 55 00 5F 00 47 00 30 00 31 00 \.F.M.U._.G.0.1.
>000000B0 2E 00 42 00 4D 00 50 00 00 00 00 00 10 F0 12 00 ..B.M.P.........
>000000C0 00 00 02 00 00 00 00 00 00 00 00 00 04 00 40 00 ..............@.
>000000D0 10 00 5A 00 00 00 11 F0 00 00 00 00 ..Z.........
>-END DUMP-----------------------------------
>recordid = 0xec, size =220
> [MSODRAWING]
>Drawing Container n=0
> Drawing Atom v=0 (f008) Drawing ID=1
> Number of Shapes: 2
> Last Assigned Shape ID: 1:1
> Shape Group Container (f003) n=0
> Shape Container n=0
> DrawingShapeGroup Atom v=1 n=0
> Boundary: (0,0)-(0,0)
> Shape v=2 (f00a) Primitive
> ShapeId: 1:0
> Flags: Group, Patriarch
> Shape Container n=0
> Shape v=2 (f00a) Picture Frame
> ShapeId: 1:1
> Flags: Anchored, Has Property
> Property Table Atom (f00b) v=3, 4 properties
> Property Table
> BLIP (260): 1
> BLIP File Name (261): D:\IMAGES\FMU_G01.BMP
> [f]Fill Flags (447): 65536
> Unknown Property (959): 524288
> Client Anchor Atom v=0 (f010) n=0
> Binary Data
> 02 00 00 00 00 00 00 00 00 00 04 00 40 00 10 00
> 5A 00
>[/MSODRAWING]
>
>============================================
>Offset 0x1124 (4388)
>rectype = 0x5d, recsize = 0x26
>-BEGIN DUMP---------------------------------
>00000000 15 00 12 00 08 00 01 00 11 60 00 00 00 00 00 07 .........`......
>00000010 DC 00 00 00 00 00 07 00 02 00 FF FF 08 00 02 00 ................
>00000020 01 00 00 00 00 00 ......
>-END DUMP-----------------------------------
>recordid = 0x5d, size =38
>[UNKNOWN RECORD:5d]
> .id = 5d
>[/UNKNOWN RECORD]
>
>The Client Anchor Atom above is the anchor which describes how the drawing
>is positioned, and is interpreted outside of the Escher object. The 0x5d
>record follows immediately, and I haven't got a clue about how to build it.
That an OBJ record. The Excel 97 Developers Guide describes how to create
this record.
>Also, how does your library deal with the MSODRAWING records, which are
>scattered throughout the worksheet? Neither MSODRAWING nor MSODRAWINGGROUP
>uses CONTINUE records like the rest of Excel.
This puzzled me for a long time. I ended up aggregating them together
before attempting to decode the hierarchy. When serializing them back out
again I had to be careful to chop the hierarchy back up at the right spots.
>I too had (actually have) a package that does drawings. The drawing part
>(contents of MSODRAWING and MSODRAWINGGROUP records) are completely worked
>out, except for these unknown BIF records, and the compression of BLIP
>structures. I can build the Escher side of the MSODRAWING structure with
>various kinds of shapes and properties, including PNG images (uncompressed).
I've implemented BLIP compression and decompression (it's not too
hard). What I haven't done is provide a high level API for that bit yet.
>However, I also cannot release just yet. I'm not even a committer. And I
>thought the committers were about to release something, so I stopped work on
>the Excel interface. My main interest was getting it to work with Microsoft
>Project.
I'm a committer was planning on releasing this sooner but unfortunately
it's paid work and the payment hasn't been finalized yet.
You don't need to be a committer to develop POI. Just submit a patch and
if everything is okay one of the committers will load it into CVS for you.
The stuff I have is a little bit tied to Excel but could be made more
generic without too much effort.
RE: Including images in Excel sheet
Posted by Michael Zalewski <za...@optonline.net>.
I am curious if you have deciphered the meaning of the 0x5d BIFF record that
occurs between MSODRAWING records. It does not seem to be an anchor. If you
know, I would appreciate comments.
Here is an example from my enhanced version of BiffViewer.
============================================
Offset 0x1044 (4164)
rectype = 0xec, recsize = 0xdc
-BEGIN DUMP---------------------------------
00000000 0F 00 02 F0 D4 00 00 00 10 00 08 F0 08 00 00 00 ................
00000010 02 00 00 00 01 04 00 00 0F 00 03 F0 BC 00 00 00 ................
00000020 0F 00 04 F0 28 00 00 00 01 00 09 F0 10 00 00 00 ....(...........
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000040 02 00 0A F0 08 00 00 00 00 04 00 00 05 00 00 00 ................
00000050 0F 00 04 F0 84 00 00 00 B2 04 0A F0 08 00 00 00 ................
00000060 01 04 00 00 00 0A 00 00 43 00 0B F0 4A 00 00 00 ........C...J...
00000070 04 41 01 00 00 00 05 C1 32 00 00 00 BF 01 00 00 .A......2.......
00000080 01 00 BF 03 00 00 08 00 44 00 3A 00 5C 00 42 00 ........D.:.\.B.
00000090 41 00 53 00 49 00 53 00 5C 00 47 00 4D 00 4C 00 A.S.I.S.\.G.M.L.
000000A0 5C 00 46 00 4D 00 55 00 5F 00 47 00 30 00 31 00 \.F.M.U._.G.0.1.
000000B0 2E 00 42 00 4D 00 50 00 00 00 00 00 10 F0 12 00 ..B.M.P.........
000000C0 00 00 02 00 00 00 00 00 00 00 00 00 04 00 40 00 ..............@.
000000D0 10 00 5A 00 00 00 11 F0 00 00 00 00 ..Z.........
-END DUMP-----------------------------------
recordid = 0xec, size =220
[MSODRAWING]
Drawing Container n=0
Drawing Atom v=0 (f008) Drawing ID=1
Number of Shapes: 2
Last Assigned Shape ID: 1:1
Shape Group Container (f003) n=0
Shape Container n=0
DrawingShapeGroup Atom v=1 n=0
Boundary: (0,0)-(0,0)
Shape v=2 (f00a) Primitive
ShapeId: 1:0
Flags: Group, Patriarch
Shape Container n=0
Shape v=2 (f00a) Picture Frame
ShapeId: 1:1
Flags: Anchored, Has Property
Property Table Atom (f00b) v=3, 4 properties
Property Table
BLIP (260): 1
BLIP File Name (261): D:\IMAGES\FMU_G01.BMP
[f]Fill Flags (447): 65536
Unknown Property (959): 524288
Client Anchor Atom v=0 (f010) n=0
Binary Data
02 00 00 00 00 00 00 00 00 00 04 00 40 00 10 00
5A 00
[/MSODRAWING]
============================================
Offset 0x1124 (4388)
rectype = 0x5d, recsize = 0x26
-BEGIN DUMP---------------------------------
00000000 15 00 12 00 08 00 01 00 11 60 00 00 00 00 00 07 .........`......
00000010 DC 00 00 00 00 00 07 00 02 00 FF FF 08 00 02 00 ................
00000020 01 00 00 00 00 00 ......
-END DUMP-----------------------------------
recordid = 0x5d, size =38
[UNKNOWN RECORD:5d]
.id = 5d
[/UNKNOWN RECORD]
The Client Anchor Atom above is the anchor which describes how the drawing
is positioned, and is interpreted outside of the Escher object. The 0x5d
record follows immediately, and I haven't got a clue about how to build it.
Also, how does your library deal with the MSODRAWING records, which are
scattered throughout the worksheet? Neither MSODRAWING nor MSODRAWINGGROUP
uses CONTINUE records like the rest of Excel.
I too had (actually have) a package that does drawings. The drawing part
(contents of MSODRAWING and MSODRAWINGGROUP records) are completely worked
out, except for these unknown BIF records, and the compression of BLIP
structures. I can build the Escher side of the MSODRAWING structure with
various kinds of shapes and properties, including PNG images (uncompressed).
However, I also cannot release just yet. I'm not even a committer. And I
thought the committers were about to release something, so I stopped work on
the Excel interface. My main interest was getting it to work with Microsoft
Project.
Michael Zalewski
-----Original Message-----
From: Glen Stampoultzis [mailto:gstamp@iinet.net.au]
Sent: Tuesday, December 02, 2003 11:39 PM
To: POI Users List
Subject: Re: Including images in Excel sheet
Well I have some code which almost goes as far as letting you do this that
unfortunately I can't release it yet.
Regards,
Glen
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org
Re: Including images in Excel sheet
Posted by Glen Stampoultzis <gs...@iinet.net.au>.
Well I have some code which almost goes as far as letting you do this that
unfortunately I can't release it yet.
Regards,
Glen
At 04:10 AM 3/12/2003, you wrote:
>Also, if someone has a hint for me for a java class, which can create
> > this bar code
>http://www.krysalis.org/barcode/
>
>However, as far as poi is concerned, we dont have the ability to attach
>images into worksheets currently.. but its a sorely needed
>functionality, and someone needs to volunteer.....
>
>On Tue, 2003-12-02 at 22:32, Christoph Jaeger wrote:
> > Hi,
> >
> > Is there a way of including an image into an Excel sheet created with
> > POI? I want to create a sheet including a bar code (I will probably be
> > able to create a GIF or PNG or PDF image of the bar code to be used).
> > The sheet will be printed and the bar code scanned with a bar code
> > scanner later.
> >
> > Also, if someone has a hint for me for a java class, which can create
> > this bar code (I do not care too much about which type of code, as long
> > as an ordinary scanner can read it), I would be glad to hear it.
> >
> > Thanks a lot,
> >
> > Best Regards,
> >
> > Christoph Jäger
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: poi-user-help@jakarta.apache.org
> >
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: poi-user-help@jakarta.apache.org
Glen Stampoultzis
gstamp@iinet.net.au
http://members.iinet.net.au/~gstamp/glen/
Re: Including images in Excel sheet
Posted by Avik Sengupta <av...@itellix.com>.
Also, if someone has a hint for me for a java class, which can create
> this bar code
http://www.krysalis.org/barcode/
However, as far as poi is concerned, we dont have the ability to attach
images into worksheets currently.. but its a sorely needed
functionality, and someone needs to volunteer.....
On Tue, 2003-12-02 at 22:32, Christoph Jaeger wrote:
> Hi,
>
> Is there a way of including an image into an Excel sheet created with
> POI? I want to create a sheet including a bar code (I will probably be
> able to create a GIF or PNG or PDF image of the bar code to be used).
> The sheet will be printed and the bar code scanned with a bar code
> scanner later.
>
> Also, if someone has a hint for me for a java class, which can create
> this bar code (I do not care too much about which type of code, as long
> as an ordinary scanner can read it), I would be glad to hear it.
>
> Thanks a lot,
>
> Best Regards,
>
> Christoph Jäger
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org