Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Spreadsheet::WriteExcel - multi-coloured text in cells

5 views
Skip to first unread message

Gary Stainburn

unread,
May 15, 2013, 5:34:02 AM5/15/13
to begi...@perl.org
Hi folks

Is it possible to write text cells where part of the string is highlighted in
red? If so, how can I do it?

Gary

David Precious

unread,
May 15, 2013, 3:35:19 PM5/15/13
to begi...@perl.org
On Wed, 15 May 2013 10:34:02 +0100
Gary Stainburn <gary.st...@ringways.co.uk> wrote:

> Is it possible to write text cells where part of the string is
> highlighted in red? If so, how can I do it?

I'm fairly sure the format of a cell applies to the whole content of
that cell - can you do what you're asking for in Excel or similar
yourself? If not, then I very much doubt you can do it via
Spreadsheet::WriteExcel.



--
David Precious ("bigpresh") <dav...@preshweb.co.uk>
http://www.preshweb.co.uk/ www.preshweb.co.uk/twitter
www.preshweb.co.uk/linkedin www.preshweb.co.uk/facebook
www.preshweb.co.uk/cpan www.preshweb.co.uk/github


Dr.Ruud

unread,
May 16, 2013, 7:27:14 AM5/16/13
to begi...@perl.org
On 15/05/2013 21:35, David Precious wrote:
> On Wed, 15 May 2013 10:34:02 +0100
> Gary Stainburn <gary.st...@ringways.co.uk> wrote:

>> Is it possible to write text cells where part of the string is
>> highlighted in red? If so, how can I do it?
>
> I'm fairly sure the format of a cell applies to the whole content of
> that cell - can you do what you're asking for in Excel or similar
> yourself? If not, then I very much doubt you can do it via
> Spreadsheet::WriteExcel.

There is cell formatting and there is text formatting.
Each character can basically have its own background-color,
foreground-color, font, font-weight, etc.

And beyond that, each cell can contain an object, like a Word-document.
But you don't need to go there to achieve what you want.

First find out how you would do it in its internal language (VB?),
and then port that.

--
Ruud

Jenda Krynicky

unread,
Jun 4, 2013, 8:46:10 AM6/4/13
to begi...@perl.org
From: "Dr.Ruud" <rvtol+...@isolution.nl>
Knowing how it's done in "VB For Applications" would help if he was
controlling an instance of excel via Win32::OLE. Then there would be
a way to port that code to Perl. When using Spreadsheet::WriteExcel,
the capabilities of whatever Excel he happens to have installed are
at most an upper bound of features. Not something that could be taken
for granted. If something is not possible via Excel, it most probably
will not be possinble using S::WE, but the fact that Excel can do
something doesn't say anything about S::WE.

Jenda
===== Je...@Krynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery

0 new messages