|
Posted by romanmr on January 20, 2005, 2:40 pm
Please log in for more thread options
Hi,
Is it possible to use set_row and set_column functions to group the
range by both rows and columns? I am getting either one or the other.
#!/usr/local/bin/perl
use strict;
use Spreadsheet::WriteExcel;
my $workbook = Spreadsheet::WriteExcel->new("test.xls");
my $wsh = $workbook->add_worksheet("test");
my($i);
for ($i=0; $i<10; $i++)
{
if($i<5)
{ $wsh->set_column($i, $i, undef, undef, 1, 1); }
else{ $wsh->set_column($i, $i, undef, undef, 1, 2);};
};
#
# when I copy rest of the code above previous block
# I get rows grouped but not columns
#
for ($i=0; $i<10; $i++)
{
if ($i<5)
{
$wsh->set_row($i, undef, undef, 1, 2);
}else{ $wsh->set_row($i, undef, undef, 1, 1);};
};
$workbook->close();
exit(0);
|
|
Posted by Terrence Brannon on January 21, 2005, 12:04 am
Please log in for more thread options
> Hi,
> Is it possible to use set_row and set_column functions to group the
> range by both rows and columns? I am getting either one or the other.
Perhaps email the author of the module..
plan9@eircom.net
--
Carter's Compass: I know I'm on the right track when,
by deleting something, I'm adding functionality.
|
|
Posted by jmcnamara on January 21, 2005, 3:37 am
Please log in for more thread options > Perhaps email the author of the module..
Or better still post it to the new Spreadsheet::WriteExcel Google
group. That way we can build up a collection of knowledge:
http://groups-beta.google.com/group/spreadsheet-writeexcel
John.
--
|
|
Posted by jmcnamara on January 21, 2005, 3:34 am
Please log in for more thread options It *is* possible to have outlines for rows and columns at the same
time.
In fact I tested your code (with set_row() before and after
set_column()) and it worked fine with the version 2.11 of
Spreadsheet::WriteExcel. So try an upgrade and see if that helps.
Here is another short example:
#!/usr/bin/perl -w
use strict;
use Spreadsheet::WriteExcel;
my $workbook = Spreadsheet::WriteExcel->new('outline.xls');
my $worksheet = $workbook->add_worksheet();
$worksheet->set_row(1, undef, undef, 0, 1);
$worksheet->set_row(2, undef, undef, 0, 1);
$worksheet->set_row(3, undef, undef, 0, 1);
$worksheet->set_column('A:C', undef, undef, 0, 1);
John.
--
|
| Similar Threads | Posted | | Batch Renaming a group of files in a directory. | November 28, 2007, 1:33 am |
| Spreadsheet::WriteExcel | December 7, 2005, 3:50 pm |
| WriteExcel internal hyperlink | August 5, 2004, 8:31 am |
| ANNOUNCE: Spreadsheet::WriteExcel 2.04 | August 19, 2004, 12:05 am |
| Query about Spreadsheet::WriteExcel | September 10, 2004, 3:54 pm |
| ANNOUNCE: Spreadsheet::WriteExcel 2.10 | September 24, 2004, 12:52 am |
| Spreadsheet::WriteExcel and Frames | October 11, 2004, 1:08 pm |
| Spreadsheet::WriteExcel new($var) not working | May 20, 2008, 6:10 am |
| Spreadsheet::WriteExcel format width | May 20, 2005, 1:04 pm |
| WriteExcel->sheets() fails in getting worksheets | May 5, 2008, 7:38 pm |
|