Spreadsheet::WriteExcel pre-release with Cell Comments

24 views
Skip to first unread message

jmcnamara

unread,
Oct 6, 2005, 5:27:03 AM10/6/05
to Spreadsheet::WriteExcel
A pre-release of the next version of Spreadsheet::WriteExcel with
support for cell comments is now available.

Cell comments were available in some Excel 5/95 versions of
Spreadsheet::WriteExcel, i.e., versions < 2.00. However the internal
format changed considerably in the Excel 97+ format and it has taken a
while to reimplement it.


This is a beta and there are still some aspects to be finalised.
Outstanding issues are:

* The comment text box doesn't take into account
size changes to underlying rows and columns.
(This will be fixed soon).
* The format of the comment box isn't configurable, yet.


>From the docs:

write_comment($row, $column, $string)

The write_comment() method is used to add a comment to a cell. A cell
comment is indicated in Excel by a small red triangle in the upper
right-hand corner of the cell. Moving the cursor over the red triangle
will cause the comment to appear.

The following example shows how to add a comment to a cell:

$worksheet->write("C3", "Hello");
$worksheet->write_comment("C3", "This is a comment.");


If you would like to try the pre-release you can download it from here:

http://homepage.eircom.net/~jmcnamara/perl/prerel/Spreadsheet-WriteExcel-2.15.1.tar.gz


Additional good news is that this work also paves the way for other
"object" features such as AutoFilters and embedded images that will be
compatible with Openoffice and Gnumeric (and not just constrained to
bimaps).

John.
--

jmcnamara

unread,
Oct 6, 2005, 5:27:03 AM10/6/05
to Spreadsheet::WriteExcel

jmcnamara

unread,
Oct 7, 2005, 3:53:35 AM10/7/05
to Spreadsheet::WriteExcel
> This is a beta and there are still some aspects to be finalised.
> Outstanding issues are:

It also appears that images added via insert_bitmap() will not display
if cell comments are in operation. I will fix this before the module is
released to CPAN.

John.
--

jmcnamara

unread,
Oct 19, 2005, 4:16:03 AM10/19/05
to Spreadsheet::WriteExcel
A further pre-release of the next version of Spreadsheet::WriteExcel

with support for cell comments is now available.

This release fixes the problem in the previous beta where the comment
text box didn't take into account changes to underlying rows and
columns.

This is a beta and there are still some aspects to be finalised.
Outstanding issues are:

* The format of the comment box isn't configurable, yet.

* Comments aren't compatible with images added via
insert_bitmap(). If a comment is added to a worksheet
then any images on the sheet will not be visible.
This will be fixed.

If you would like to try the pre-release you can download it from here:

http://homepage.eircom.net/~jmcnamara/perl/prerel/Spreadsheet-WriteExcel-2.15.2.tar.gz

The next release (and the full release) will support configuration of
comment box features such as width, height, position, if it is visible
or not and the comments author's name.

Formatting of the comment text font (or fonts) may be partially
supported but will have to wait until the formatting code is refactored
(in a few months time) before it is supported fully.

If anyone has any opinions on these issues, or would like to see
specific features related to cell comments, please speak up now.

John.
--

wan

unread,
Oct 25, 2005, 4:01:43 PM10/25/05
to Spreadsheet::WriteExcel
The write_comment() can fill sample string and variable, and when I try
to add variable with complex string (space, !@#$ ... ), the generated
excel file can not be opened with comments.

jmcnamara

unread,
Oct 25, 2005, 7:29:10 PM10/25/05
to Spreadsheet::WriteExcel
A further pre-release of the next version of Spreadsheet::WriteExcel

with support for cell comments is now available.

This release fixes problems with UTF-16 and UTF-8 Unicode support in
cell comments.

The comment box configuration options are also in place but not
documented. See the comments.pl program in the examples directory for a
demonstration.


This is a beta and there are still some aspects to be finalised.
Outstanding issues are:

* Excel will complain loudly if you try to write more than one
comment in a cell. So don't do that. ;-) It will be fixed soon.

* Comments aren't compatible with images added via
insert_bitmap(). If a comment is added to a worksheet
then any images on the sheet will not be visible.
This will be fixed.

If you would like to try the pre-release you can download it from here:

http://homepage.eircom.net/~jmcnamara/perl/prerel/Spreadsheet-WriteExcel-2.15.3.tar.gz

John.
--

jmcnamara

unread,
Oct 25, 2005, 7:35:02 PM10/25/05
to Spreadsheet::WriteExcel
I'm guessing from this and the email that you sent that the problem may
be with Unicode characters. Unicode support in cell comments was broken
in 2.15.1 and 2.15.2. Try the 2.15.3 release described elsewhere in
this thread.

If you still have a problem create a small example program that
demonstrates it and post it here.

John.
--

Larry

unread,
Nov 4, 2005, 12:45:23 PM11/4/05
to Spreadsheet::WriteExcel
John:

I downloaded your new 2.15.1 release, and voila, the comments work
beautifully! However my single insert_bitmap() command appears to be
ignored. Any hints on this behavior? Bitmap worked fine under 2.15

-larry

jmcnamara

unread,
Nov 4, 2005, 6:42:41 PM11/4/05
to Spreadsheet::WriteExcel
Hi Larry,

Comment aren't currently compatible with images due to a conflict
between Excel 97 objects (comments) and Excel 5 objects (images).

I'm working on this and it will be fixed before the full CPAN release.

BTW, the pre-release is up to version 2.15.3, see elsewhere in this
thread.

John.
--

Jobius

unread,
Nov 17, 2005, 6:10:27 PM11/17/05
to Spreadsheet::WriteExcel
jmcnamara wrote:
> A further pre-release of the next version of Spreadsheet::WriteExcel
> with support for cell comments is now available.

> The comment box configuration options are also in place but not


> documented. See the comments.pl program in the examples directory for a
> demonstration.

Thanks, this is nice. It doesn't look like you can change the font
size in the comment. Would it be possible to add this?

jmcnamara

unread,
Nov 17, 2005, 10:07:42 PM11/17/05
to Spreadsheet::WriteExcel
> It doesn't look like you can change the font
> size in the comment. Would it be possible to add this?

It requires a (largish) change to the Format module to do it properly.

It won't be in the next CPAN release but it may be in the release after
that (if it works. :-)).

In the meantime it will be possible to do it via an undocumented
feature. I'll post an example after the next pre-release, which should
be in the next few days.

John.
--

Reply all
Reply to author
Forward
0 new messages