Perl : blank lines are displayed in the output after deleting few rows from excel
I am working on an assignment to pull all the records from excel sheet programatically and use the data for further calculations.
In this process, I first defined 10 records in excel sheet and executed the below code.
In the first run it is OK. But after deleting last few rows in excel sheet and then running, blank lines are displayed at the end.
---------- Post updated at 06:46 AM ---------- Previous update was at 06:33 AM ----------
Its done..
applied if condition to check the string whether null or not
Last edited by Scott; 08-02-2012 at 09:14 AM..
Reason: Use code tags, please...
Hi,
I need convert a dump file in the following format : (please note that line numbers are provided for easy look)
Original file:
1 2007-10-2482.90 No trade 0 0.00 100000.00
2 100000.00
3 0.00
4 HOLD
5 2007-10-2589.75 Bought 1114 1114 100000.00 0.00
... (5 Replies)
Hi Guru's , I have a whole bunch of files in /var/tmp that i need to strip any blank lines from, so ive written the following script to identify the lines (which works perfectly).. but i wanted to know, how can I actually strip the identified lines from the actual source files ??
my... (11 Replies)
Friends, I am executing this command in solaris sar -d 3 3 | awk 'NR > 2 { if ($1 !~ /,.+/) print }' | egrep -v "nfs|device" . Now i want to delete the last two lines of my output as they are records of average which i don't want. can some one pls give me some idea on how to proceed. (7 Replies)
Hi friends, I am working on a perl script to count the commented lines, blank lines and source lines separately. Let me know if you have one. For example i have a file containing the lines:
/**
* SOURCE CODE
*/
public class SessionConstants {
/**
* Code for Session created
*/... (4 Replies)
Good morning!!
Im trying to create a script that should get a list of numbers from the user (using STDIN or a list of arguments), and call my library function.
My script:
#!use/bin/perl
require 'my-lib.pl';
@userArray = <STDIN>;
while()
{
chomp;
last if ! /\d/;... (1 Reply)
Hi Guys,
I have a quetion which was already discussed in the forum, but for some reason all approches suggested fail for me.
I have a file which have blank lines at the body of the text as well as at the end. I need to delete ONLY blank lines at the end. Unfortunatly the approach below does not... (5 Replies)
Hi All
I have the following code
sub pall_nvrm {
my $cmd = `pall -w "/u/ab/scripts/dev/nvrmerros/nvrmpaller"`;
print $cmd;
}
if i run
pall -w "/u/ab/scripts/dev/nvrmerros/nvrmpaller"
in a shell i get this sort of out put
eagley:
boxted:
cadle:
eabost:
hales: (3 Replies)
I have a excel sheet with contains the records as below..
also uploaded the input excelsheet and the output excel sheet(expected output).
322mpls32.net.xyz.comBW: 44.0 M Hrly Avg (IN /... (1 Reply)
I've spent the past hour trying different things and googling for this solution and cannot find the answer. Found variations of this, but not this exact thing.
I have the following text, which is the output from our mainframe. Each field is on a separate line, with a blank line between each... (7 Replies)
Discussion started by: lupin..the..3rd
7 Replies
LEARN ABOUT DEBIAN
excel::template::container::worksheet
Excel::Template::Container::Worksheet(3pm) User Contributed Perl Documentation Excel::Template::Container::Worksheet(3pm)NAME
Excel::Template::Container::Worksheet - Excel::Template::Container::Worksheet
PURPOSE
To provide a new worksheet.
NODE NAME
WORKSHEET
INHERITANCE
Excel::Template::Container
ATTRIBUTES
o NAME
This is the name of the worksheet to be added.
o PROTECT
If the attribute exists, it will mark the worksheet as being protected. Whatever value is set will be used as the password.
This activates the HIDDEN and LOCKED nodes.
o KEEP_LEADING_ZEROS
This will change the behavior of the worksheet to preserve leading zeros.
o HIDE_GRIDLINE
his method is used to hide the gridlines on the screen and printed page. Gridlines are the lines that divide the cells on a worksheet.
Screen and printed gridlines are turned on by default in an Excel worksheet. If you have defined your own cell borders you may wish to
hide the default gridlines.
$worksheet->hide_gridlines();
The following values of $option are valid:
0 : Don't hide gridlines
1 : Hide printed gridlines only
2 : Hide screen and printed gridlines
If you don't supply an argument or use undef the default option is 1, i.e. only the printed gridlines are hidden.
o LANDSCAPE
This will set the worksheet's orientation to landscape.
o PORTRAIT
This will set the worksheet's orientation to portrait.
While this is the default, it's useful to override the default at times. For example, in the following situation:
<workbook landscape="1">
<worksheet>
...
</worksheet
<worksheet portrait="1">
...
</worksheet
<worksheet>
...
</worksheet
</workbook>
In that example, the first and third worksheets will be landscape (inheriting it from the workbook node), but the second worksheet will
be portrait.
o AUTOFILTER
With these attribute, you can add the autofilter to a worksheet. An autofilter is a way of adding drop down lists to the headers of a
2D range of worksheet data. This is turn allow users to filter the data based on simple criteria so that some data is shown and some
is hidden.
Example to add an autofilter to a worksheet:
<workbook>
<worksheet autofilter='A1:D11' />
<worksheet autofilter='0, 0, 10, 3' />
</workbook>
CHILDREN
None
EFFECTS
None
DEPENDENCIES
None
USAGE
<worksheet name="My Taxes">
... Children here
</worksheet>
In the above example, the children will be executed in the context of the "My Taxes" worksheet.
AUTHOR
Rob Kinyon (rob.kinyon@gmail.com)
SEE ALSO
ROW, CELL, FORMULA
perl v5.14.2 2010-06-17 Excel::Template::Container::Worksheet(3pm)