10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Source Code of the original script is down below please run the script and try to solve this problem
this is my data and I want it column wise
2019-03-20 13:00:00:000
2019-03-20 15:00:00:000
1
Operating System
LAB
0
1
1
1
1
1
1
1
1
1
0
1 (5 Replies)
Discussion started by: Shubham1182
5 Replies
2. Shell Programming and Scripting
I am using KSH, share some sample code to merge multiple CSV files (each CSV has different number of columns) in same Directory into single XLSX with multiple tab/sheet - each CSV goes to each sheet/tab in the same XLSX.. (0 Replies)
Discussion started by: gksenthilkumar
0 Replies
3. Shell Programming and Scripting
Hello,
I have a .xlsx file with 11 worksheets and I need to insert the contents of a text file (tab delim, roughly 30 columns with 1000 rows) from Row 3 onwards on the 2nd sheet. I have my code which can insert values into existing sheet but I am unable to write/import the contents of a text... (1 Reply)
Discussion started by: nans
1 Replies
4. UNIX for Advanced & Expert Users
Hi ,
I am having a ZIP file containing an .xlsx file . Now i wanted to replace "GJ" to blank in the .xlsx file .
I tried using the below code but not working , Please guide :
#!/bin/bash
log="/home/srikant/scripts/replacescriptFHO.log"
date > $log
echo "" >> $log
echo initiating for FHO... (1 Reply)
Discussion started by: vipinmaster
1 Replies
5. Shell Programming and Scripting
I have requirement to write two CSV files to one single excel with multiple sheets.
Data present in the two files should sit in excel as different sheets.
How can we achieve this using shell script?
1.csv 2. csv
1,2,3,4 5,6,7,8
XXXXX YYYYY
Res.excel
1.csv data... (1 Reply)
Discussion started by: duplicate
1 Replies
6. Shell Programming and Scripting
Hi,
I have a data file with :
01/28/2012,1,1,98995
01/28/2012,1,2,7195
01/29/2012,1,1,98995
01/29/2012,1,2,7195
01/30/2012,1,1,98896
01/30/2012,1,2,7083
01/31/2012,1,1,98896
01/31/2012,1,2,7083
02/01/2012,1,1,98896
02/01/2012,1,2,7083
02/02/2012,1,1,98899
02/02/2012,1,2,7083
I... (1 Reply)
Discussion started by: himanish
1 Replies
7. Shell Programming and Scripting
Hi,
I have one requirement, create separate files (".csv") from one excel file(xlsx) with multiple sheets. These ".csv" files are my source files. So anybody please suggest me the process.
Thanks in Advance.
Regards,
Harris (3 Replies)
Discussion started by: harris
3 Replies
8. Shell Programming and Scripting
Hi all,
I need help to add additional data from file2 to existing data in file 1 using awk, sed or perl. the ID in file 1 should match against field $3 in file2
file1
#this is a new game
ID HR_1
BASE1 30
BASE2 37
DETAIL No
TYPE L
@@
ID HR_10
BASE1 6030
BASE2 ... (4 Replies)
Discussion started by: redse171
4 Replies
9. Shell Programming and Scripting
Hi,
I am using Solaris 8. My script outputs 4 .csv files. Currently I am SFTPing the files and creating a new excel file with the 4 files as sheets.
Can anyone suggest ways to do this in UNIX ?
Thanks,
David. (2 Replies)
Discussion started by: libin4u2000
2 Replies
10. UNIX for Dummies Questions & Answers
I was trying to find out the easiest way to write new line to the beginning of an exisiting file.
I am using KSH. (5 Replies)
Discussion started by: sailussr
5 Replies
Excel::Writer::XLSX::Chart::Column(3pm) User Contributed Perl Documentation Excel::Writer::XLSX::Chart::Column(3pm)
NAME
Column - A class for writing Excel Column charts.
SYNOPSIS
To create a simple Excel file with a Column chart using Excel::Writer::XLSX:
#!/usr/bin/perl
use strict;
use warnings;
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( 'chart.xlsx' );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column' );
# 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 Column charts for Excel::Writer::XLSX. The chart object is created via the Workbook "add_chart()" method:
my $chart = $workbook->add_chart( type => 'column' );
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 Excel::Writer::XLSX::Chart. Class specific methods or settings, if any, are explained below.
Column Chart Methods
The "Column" chart module also supports the following sub-types:
stacked
percent_stacked
These can be specified at creation time via the "add_chart()" Worksheet method:
my $chart = $workbook->add_chart( type => 'column', subtype => 'stacked' );
EXAMPLE
Here is a complete example that demonstrates most of the available features when creating a chart.
#!/usr/bin/perl
use strict;
use warnings;
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( 'chart_column.xlsx' );
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', 'Batch 1', 'Batch 2' ];
my $data = [
[ 2, 3, 4, 5, 6, 7 ],
[ 10, 40, 50, 20, 10, 50 ],
[ 30, 60, 70, 50, 40, 30 ],
];
$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 => 'column', embedded => 1 );
# Configure the first series.
$chart->add_series(
name => '=Sheet1!$B$1',
categories => '=Sheet1!$A$2:$A$7',
values => '=Sheet1!$B$2:$B$7',
);
# Configure second series. Note alternative use of array ref to define
# ranges: [ $sheetname, $row_start, $row_end, $col_start, $col_end ].
$chart->add_series(
name => '=Sheet1!$C$1',
categories => [ 'Sheet1', 1, 6, 0, 0 ],
values => [ 'Sheet1', 1, 6, 2, 2 ],
);
# 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 (mm)' );
# Set an Excel chart style. Blue colors with white outline and shadow.
$chart->set_style( 11 );
# 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-MMXII, 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 2012-04-02 Excel::Writer::XLSX::Chart::Column(3pm)