12-17-2012
If you want to work with worksheets then you have to use PERL, using
Spreadsheet::WriteExcel module.
Or you can create a
CSV if you don't want to deal with multiple worksheets.
This User Gave Thanks to Yoda For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all
I am new to shell scripting.
I need to write a shell script that reads each row of an USER_ID colume in a excel file.
the excel has around 10000 rows of data.
Can someone gives me some example or advice what's best way to do this
thanks (11 Replies)
Discussion started by: tiger99
11 Replies
2. Shell Programming and Scripting
Hi,
I have a shellscript that produces a csv that can be opened in Microsoft Excel. It has two columns and about 10 rows in each column, so only twenty cells (at the moment). When the user opened the csv, I wanted it so autofilter was already turned on in columns A1 and B1 (and potentially C1,... (1 Reply)
Discussion started by: rainemaida
1 Replies
3. Shell Programming and Scripting
Hi All,
Am trying to write a shell script which will get values from an excel and do some calculations.
Can any one pls help me out in the commands used to get the values from ms-excel.
Thanks!!!:) (2 Replies)
Discussion started by: msri.1900
2 Replies
4. Shell Programming and Scripting
I have requirement where i have to export the data extracted from a flat file to a microsoft excel sheet. If the awk returns multiple records then all these records should go in into different rows of same column in excel.
Eg. say data returned by excel is A,B,C,D then these 4 records should go... (1 Reply)
Discussion started by: goutam_igate
1 Replies
5. Shell Programming and Scripting
Hi,
I am having a business file in excel having charts based on data already present on it. I would like to add new rows after the existing data and refesh the chart on it using shell script.
For example--
In excel file in "sheet1", There is some data in first 10 rows ( from column A to F).... (0 Replies)
Discussion started by: sanjay1979
0 Replies
6. UNIX for Dummies Questions & Answers
i have both linux and windos installed on my pc . i want to take 1st column of excel as in input for my shell script .can anyone tell me how can i achive that. (1 Reply)
Discussion started by: nitin_aaa27
1 Replies
7. Shell Programming and Scripting
I am getting an xls file in the dir errorpath. I would like to zip it. Kindly help me on this.
The code is as below.
sqllst=$errorpath/$run_pgm.${date_stamp}".xls" sqlstatus=$errorpath/$run_pgm"."${date_stamp}".sqlstatus" sqlscript=$binpath"/im_rpt.sql" (2 Replies)
Discussion started by: Nithin
2 Replies
8. UNIX for Dummies Questions & Answers
Is it possible to read an excel sheet using shell script ? (2 Replies)
Discussion started by: hiten.r.chauhan
2 Replies
9. UNIX for Advanced & Expert Users
Hi.
I wish to add data in a specific excel file on daily basis.However the currect dat's data should always come on top i.e for example should always occupy cell A7,B7,C7 ..
and the data of day before which was earlier on 7th row of each coloumn should move to 8th row..data on 8th row should... (1 Reply)
Discussion started by: kanus
1 Replies
10. Shell Programming and Scripting
I am facing a problem formatting the output of my shell script in excel.
We are directing the output of the script to an excel sheet and need long integer type data printed in Excel as it is (i.e. not in the default scientific notation).
Also, leading zeroes(if any) in the output are getting... (4 Replies)
Discussion started by: bornali.p
4 Replies
LEARN ABOUT DEBIAN
spreadsheet::writeexcel::chart::line
Spreadsheet::WriteExcel::Chart::Line(3pm) User Contributed Perl Documentation Spreadsheet::WriteExcel::Chart::Line(3pm)
NAME
Line - A writer class for Excel Line charts.
SYNOPSIS
To create a simple Excel file with a Line 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 => 'line' );
# 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 Line charts for Spreadsheet::WriteExcel. The chart object is created via the Workbook "add_chart()" method:
my $chart = $workbook->add_chart( type => 'line' );
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_x_axis();
$chart->set_y_axis();
$chart->set_title();
These methods are explained in detail in Spreadsheet::WriteExcel::Chart. Class specific methods or settings, if any, are explained below.
Line Chart Methods
There aren't currently any line chart specific methods. See the TODO section of Spreadsheet::WriteExcel::Chart.
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_line.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 = [ 'Number', 'Sample 1', 'Sample 2' ];
my $data = [
[ 2, 3, 4, 5, 6, 7 ],
[ 1, 4, 5, 2, 1, 5 ],
[ 3, 6, 7, 5, 4, 3 ],
];
$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 => 'line', embedded => 1 );
# Configure the first series. (Sample 1)
$chart->add_series(
name => 'Sample 1',
categories => '=Sheet1!$A$2:$A$7',
values => '=Sheet1!$B$2:$B$7',
);
# Configure the second series. (Sample 2)
$chart->add_series(
name => 'Sample 2',
categories => '=Sheet1!$A$2:$A$7',
values => '=Sheet1!$C$2:$C$7',
);
# Add a chart title and some axis labels.
$chart->set_title ( name => 'Results of sample analysis' );
$chart->set_x_axis( name => 'Test number' );
$chart->set_y_axis( name => 'Sample length (cm)' );
# Insert the chart into the worksheet (with an offset).
$worksheet->insert_chart( 'D2', $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::Line(3pm)