i need some help with creating a chart in MSexcel. currently i'm using Spreadsheet::WriteExcel module to import data into excel. i have several 2 column tables one under another . something like this:
the thing is that the number of rows in columns and number of columns is variable, but if the first column has 5 rows then all other columns have 5 rows, but the number of other sets of columns is always different.column1 column2 column1 column2 column1 column2 column1 column2 column1 column2 column1 column2 column1 column2 ... ... column1 column2 column1 column2 column1 column2 column1 column2 column1 column2 column1 column2 column1 column2 ... ...
up till now i was solving this problem by creating an excel template for let say 10 rows in a column and 10 sets of columns, and then just populate the correct template. but this is not possible any more. so if anyone has an conceptual idea on how to do this please do share .
this is just the example of what i'm doing now
thanxsub _xlsout { ################################################## my ($self, %arg) = @_; my $value = $self->{values}=$arg{values}; # get the values my $key = $self->{key}=$arg{key}; # decide about the right te +mplate my @SHarray = @$key; my $indeks = @SHarray; my $workbook = Spreadsheet::WriteExcel->new("Phylostratigraphic_map.x +ls"); # create xls file my $worksheet = $workbook->add_worksheet(); my $chart = $workbook->add_chart_ext("./bin/Phylo$indeks.bin", '####Ma +p####'); # ----------> here is where i import the excel template $worksheet->store_formula('=Sheet1!A1'); my $chart_font_1 = $workbook->add_format(font_only => 1); my $chart_font_2 = $workbook->add_format(font_only => 1); my $bold = $workbook->add_format(bold => 1); $worksheet->set_column('A:A', 18); $worksheet->set_column('B:B', 18); $worksheet->write('A1', 'Phylostratum', $bold); $worksheet->write('B1', 'Hit', $bold); my $row = 1; $worksheet->write_col('A2', $value); }
In reply to perl xls chart by baxy77bax
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |