I know the issue is "
" as i get the following when i try to run the script:
The thing is I need to have 2 worksheets, 1 with all the data and 1 with the chart,
Can anyone help?
Can anyone help .....
I am prettey new to perl but would like to do the following :- write a script that would open one or more log files and select a few lines from each and create a new file with the selected lines from the logs.
Thanx (4 Replies)
Hello All,
I have a query inside a shell script and it will retun a 1000 rows result set. how can i take the output into an excel file from the script for better viewing the results.
Thanks,
Sateesh (4 Replies)
Hi,
I want to use the mailx command or sendmail command in perl script.
I am trying this one and getting error:
system "mailx -s \"Test mail\" $ar1";
Error:
The flags you gave are used only when sending mail. (10 Replies)
Hi
How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Hi All,
Need help configuring Active Perl on Windows Vista.
I am trying to install Active Perl on Windows Vista.
The version of Active Perl i am trying to install is : ActivePerl 5.10.1 Build 1006
After installing it through cmd, When i try to run perl -v to check the version, i get the... (2 Replies)
Hi all,
I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first.
Can you please help me determine which one to... (14 Replies)
Gents,
I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Anyone know how we can implement excel trimmean avg in Unix. possible by AWK
Sample File
scr1 100
scr1 2000
scr2 320
scr1 50
scr1 10
scr2 2
scr2 220
scr1 4234
scr2 2435
scr2 2
scr3 345
scr2 356
expected Output, which was using =trimmean(scr1 values, ignore 50% of values from... (8 Replies)
Discussion started by: mychbears
8 Replies
LEARN ABOUT DEBIAN
spreadsheet::writeexcel::chart::pie
Spreadsheet::WriteExcel::Chart::Pie(3pm) User Contributed Perl Documentation Spreadsheet::WriteExcel::Chart::Pie(3pm)NAME
Pie - A writer class for Excel Pie charts.
SYNOPSIS
To create a simple Excel file with a Pie chart using Spreadsheet::WriteExcel:
#!/usr/bin/perl -w
use strict;
use Spreadsheet::WriteExcel;
my $workbook = Spreadsheet::WriteExcel->new( 'chart.xls' );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie' );
# Configure the chart.
$chart->add_series(
categories => '=Sheet1!$A$2:$A$7',
values => '=Sheet1!$B$2:$B$7',
);
# Add the worksheet data the chart refers to.
my $data = [
[ 'Category', 2, 3, 4, 5, 6, 7 ],
[ 'Value', 1, 4, 5, 2, 1, 5 ],
];
$worksheet->write( 'A1', $data );
__END__
DESCRIPTION
This module implements Pie charts for Spreadsheet::WriteExcel. The chart object is created via the Workbook "add_chart()" method:
my $chart = $workbook->add_chart( type => 'pie' );
Once the object is created it can be configured via the following methods that are common to all chart classes:
$chart->add_series();
$chart->set_title();
These methods are explained in detail in Spreadsheet::WriteExcel::Chart. Class specific methods or settings, if any, are explained below.
Pie Chart Methods
There aren't currently any pie chart specific methods. See the TODO section of Spreadsheet::WriteExcel::Chart.
A Pie chart doesn't have an X or Y axis so the following common chart methods are ignored.
$chart->set_x_axis();
$chart->set_y_axis();
EXAMPLE
Here is a complete example that demonstrates most of the available features when creating a chart.
#!/usr/bin/perl -w
use strict;
use Spreadsheet::WriteExcel;
my $workbook = Spreadsheet::WriteExcel->new( 'chart_pie.xls' );
my $worksheet = $workbook->add_worksheet();
my $bold = $workbook->add_format( bold => 1 );
# Add the worksheet data that the charts will refer to.
my $headings = [ 'Category', 'Values' ];
my $data = [
[ 'Apple', 'Cherry', 'Pecan' ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $headings, $bold );
$worksheet->write( 'A2', $data );
# Create a new chart object. In this case an embedded chart.
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
# Configure the series.
$chart->add_series(
name => 'Pie sales data',
categories => '=Sheet1!$A$2:$A$4',
values => '=Sheet1!$B$2:$B$4',
);
# Add a title.
$chart->set_title( name => 'Popular Pie Types' );
# Insert the chart into the worksheet (with an offset).
$worksheet->insert_chart( 'C2', $chart, 25, 10 );
__END__
AUTHOR
John McNamara jmcnamara@cpan.org
COPYRIGHT
Copyright MM-MMX, John McNamara.
All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
perl v5.10.1 2010-02-02 Spreadsheet::WriteExcel::Chart::Pie(3pm)