Context:
I need to remove unwanted newlines from a data file listing books and associated data. Here is a sample listing ( line numbers included ):
1 360762| Skip-beat! 14 /| 9781421517544| nb | 2008.| Nakamura, Yoshiki.| NAKAMUR | Kyoko Mogami followed
2 her true love Sho to Tokyo to... (6 Replies)
Hi Guys,
I have data in a file as follows:
a 1 2 3
b 4 5 6
a 6 7 8
a 4 7 9
b 6 8 5
c 0 8 7
So the number of rows which have data is variable (2 for the first group, one for the second group and three for the third group), but the delimiters between the... (10 Replies)
Hello, there. I have a file that's a horrible, horrible mess. (Basically, it's an export from a firewall config.) The people who generated the file didn't think that putting a newline in the middle of a hostname would ever be a problem. It is.
Here's an example of the stuff in the file:
... (2 Replies)
Hi all,
i am getting count from oracle 11g by spooling it to a file.
Now there are some newline characters and blank spaces i need to remove these.
pl provide me a awk/sed solution.
the spooled file is attached.
i tried this.. but not getting req o/p (6 Replies)
Hi All,
I have a file which looks like this:
abc 3456
computer 3214
printer 0.9823
computer 3214
Can anyone please let me know how I can format my text like this?
abc 3456 computer 3214 printer 0.9823 computer 3214
I know how to space to newlines using tr but don't know how to do... (4 Replies)
Hello! This is my first post here.
I have a file with text like:
A</title>
B
C</title>
D
I need to format it to:
AB
CD
I am trying to use sed: sed 's/<//title>\n/ /g' file > newfile
to delete </title> and the newline character, but the file is unchanged because there are... (3 Replies)
Good morning,
I need some help with getting rid of newlines with the output from a MYSQL query and putting the information into the right format that I need.
Here is the script as it is today:
#!/usr/bin/perl
my $uda = system("/opt/incontrol/mysql/bin/mysql -u root -ppassword... (2 Replies)
I want to list all html files present in a directory tree, the remove the newline and get one string with a space between files
find /home/chrisd/Desktop/seg/geohtml/ -name '*.html' | awk BEGIN{FS=\r} '{print}'
---------- Post updated at 06:47 PM ---------- Previous update was at 06:25 PM... (5 Replies)
I need to remove new lines and carriage returns from csv file.
Is there anything other than sed and gwak by which we could achieve this ? Any suggestions ? (3 Replies)
Hi Friends,
I have a data file with new lines.
How to remove the newlines and should be showed in one line.
I tried using the command
tr -d '\n' filename
sed 's/\n//g' file name
Ex: 1 abc hyd is actual record
but in our scenario showing it as
1 abc
hydthis record should be like... (5 Replies)
Discussion started by: victory
5 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)