List Info

Thread: custom colors for bgcolor in Spreadsheet:WriteExcelXML




custom colors for bgcolor in Spreadsheet:WriteExcelXML
country flaguser name
United States
2007-08-01 13:40:10
Greetings All:

I am using both Spreadsheet:WriteExcel and
Spreadsheet:WriteExcelXML.
I can get the following code to work in
Spreadsheet:WriteExcel but in
Spreadsheet:WriteExcelXML I do not get the custom color as a
backround
color and when I like at the xml script that Excel generates
(Tools-
>Macros->Microsoft Script Editor), the style that is
being applied to
the cell has a property of "background:white;". 
Any ideas why it
works in the one module but not the
Spreadsheet:WriteExcelXML module?
Here's the code:

# need to add a custom color
# in Spreadsheet:WriteExcel, using either $acca_color or the
new color
(40) works with the
# corresponding statement below

$acca_color = $workbook->set_custom_color(40, 230,  230, 
230); #
light grey used in ACCA template
# $workbook->set_custom_color(40, 230,  230,  230); #
light grey used
in ACCA template

$hs_name_frmt = $workbook->add_format();
$hs_name_frmt->copy($mer_hdr1_frmt);

$hs_name_frmt->set_bg_color($acca_color);
# $hs_name_frmt->set_bg_color(40);


Thanks
Dan


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Spreadsheet::WriteExcel" group.
To post to this group, send email to
spreadsheet-writeexcelgooglegroups.com
To unsubscribe from this group, send email to
spreadsheet-writeexcel-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/spreadsheet-writeexcel
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: custom colors for bgcolor in Spreadsheet:WriteExcelXML
country flaguser name
United States
2007-08-01 17:08:04


On Aug 1, 7:40 pm, "dan.hus...gmail.com"
<dan.hus...gmail.com>
wrote:
> the style that is being applied to
> the cell has a property of
"background:white;".  Any ideas why it
> works in the one module but not the
Spreadsheet:WriteExcelXML module?

Hi Dan,

Can you create a small example program that demonstrates the
problem.

See also the following: "FAQ: Reporting a bug in
Spreadsheet::WriteExcel",
http://groups.g
oogle.com/group/spreadsheet-writeexcel/browse_thread/thread/
23c26520737d753b?hl=en

John.
--


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Spreadsheet::WriteExcel" group.
To post to this group, send email to
spreadsheet-writeexcelgooglegroups.com
To unsubscribe from this group, send email to
spreadsheet-writeexcel-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/spreadsheet-writeexcel
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: custom colors for bgcolor in Spreadsheet:WriteExcelXML
country flaguser name
United States
2007-08-13 14:57:33
1) Provide information on your system, version of perl and
module
versions. The following program will generate everything
that is
required. Put this information in your bug report.

D:perl bug_report_info.pl

    Perl version   : 5.008008
    OS name        : MSWin32
    Module versions: (not all are required)
                     Spreadsheet::WriteExcel    2.18
                     Parse::RecDescent          1.94
                     File::Temp                 0.16
                     OLE::Storage_Lite          0.13
                     IO::Stringy                2.110


2) If your version of Spreadsheet::WriteExcel isn't the
latest then
you should probably upgrade it (or at least test on a system
with an
upgraded version).

   => I'm there

3) Say if you tested with Excel, OpenOffice, Gnumeric or
something
else. Say which version of that application you used.

   => MS Excel 2003

4) Create a small example program that demonstrates your
problem. This
is the very important. The program should be as small as
possible. A
few lines of codes are worth tens of lines of text when
trying to
describe a bug.

      use Spreadsheet::WriteExcelXML;

      $workbook  = Spreadsheet::WriteExcelXML-
>new("custom_color.xls");

      $tab = "test";

      $worksheet = $workbook->add_worksheet($tab);

      # need to add a custom color
      $acca_color = $workbook->set_custom_color(40, 230, 
230,  230);

      $test_frmt = $workbook->add_format();
      $test_frmt->set_bg_color($acca_color);

      $worksheet->write( 1,  1,'CUSTOM BGCOLOR',
$test_frmt);

      $workbook->close() or die "Error closing file:
$!";



On Aug 1, 3:08 pm, jmcnamara <jmcnam...cpan.org> wrote:
> On Aug 1, 7:40 pm, "dan.hus...gmail.com" <dan.hus...gmail.com>
> wrote:
>
> > the style that is being applied to
> > the cell has a property of
"background:white;".  Any ideas why it
> > works in the one module but not the
Spreadsheet:WriteExcelXML module?
>
> Hi Dan,
>
> Can you create a small example program that
demonstrates the problem.
>
> See also the following: "FAQ: Reporting a bug in
> Spreadsheet::WriteExcel",http://groups.google.com/group/spreadshe
et-writeexcel/browse_thread/t...
>
> John.
> --


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Spreadsheet::WriteExcel" group.
To post to this group, send email to
spreadsheet-writeexcelgooglegroups.com
To unsubscribe from this group, send email to
spreadsheet-writeexcel-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/spreadsheet-writeexcel
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: custom colors for bgcolor in Spreadsheet:WriteExcelXML
country flaguser name
United States
2007-08-14 07:38:19


On Aug 13, 8:57 pm, "dan.hus...gmail.com"
<dan.hus...gmail.com>
wrote:
>
>       # need to add a custom color
>       $acca_color = $workbook->set_custom_color(40,
230,  230,  230);
>
>       $test_frmt = $workbook->add_format();
>       $test_frmt->set_bg_color($acca_color);
>

Hi Dan,

As stated in the documentation set_custom_color() isn't
supported in
Spreadsheet:WriteExcelXML.

It may be in a later release.

John.
--




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Spreadsheet::WriteExcel" group.
To post to this group, send email to
spreadsheet-writeexcelgooglegroups.com
To unsubscribe from this group, send email to
spreadsheet-writeexcel-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/spreadsheet-writeexcel
?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )