Perl : Deleting the records in the excel sheet


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl : Deleting the records in the excel sheet
# 1  
Old 09-14-2012
Perl : Deleting the records in the excel sheet

I have a excel sheet with contains the records as below..
also uploaded the input excelsheet and the output excel sheet(expected output).

Code:
 
322mpls32.net.xyz.comBW: 44.0 MHrly Avg (IN / OUT)0:001:002:003:004:005:006:007:008:009:0010:0011:0012:0013:0014:0015:0016:0017:0018:0019:0020:0021:0022:0023:00Mon 08/27/12Tue 08/28/12Wed 08/29/12Thu 08/30/12Fri 08/31/12323mpls32.net.xyz.comBW: 44.0 MHrly Avg (IN / OUT)0:001:002:003:004:005:006:007:008:009:0010:0011:0012:0013:0014:0015:0016:0017:0018:0019:0020:0021:0022:0023:00Mon 08/27/12Tue 08/28/12Wed 08/29/12Thu 08/30/12Fri 08/31/12324mpls32.net.xyz.comBW: 622.0 MHrly Avg (IN / OUT)0:001:002:003:004:005:006:007:008:009:0010:0011:0012:0013:0014:0015:0016:0017:0018:0019:0020:0021:0022:0023:00Mon 08/27/1227% / 34%31% / 43%36% / 47%36% / 44%37% / 41%38% / 42%36% / 42%38% / 39%Tue 08/28/1233% / 38%37% / 43%37% / 37%39% / 37%40% / 37%40% / 39%34% / 34%Wed 08/29/1232% / 34%35% / 36%34% / 37%34% / 36%35% / 38%34% / 37%33% / 36%Thu 08/30/1227% / 32%30% / 38%35% / 41%32% / 38%34% / 38%36% / 41%35% / 42%32% / 40%Fri 08/31/1226% / 33%31% / 37%34% / 40%32% / 39%32% / 36%34% / 39%30% / 38%26% / 32%326mpls32.net.xyz.comBW: 622.0 MHrly Avg (IN / OUT)0:001:002:003:004:005:006:007:008:009:0010:0011:0012:0013:0014:0015:0016:0017:0018:0019:0020:0021:0022:0023:00Mon 08/27/1232% / 23%32% / 22%35% / 22%38% / 24%32% / 26%30% / 23%Tue 08/28/1230% / 17%35% / 20%30% / 19%34% / 19%33% / 20%31% / 21%Wed 08/29/1232% / 18%31% / 18%37% / 18%32% / 18%34% / 21%32% / 21%Thu 08/30/1230% / 17%30% / 18%31% / 19%32% / 20%32% / 21%327mpls32.net.xyz.comBW: 44.0 MHrly Avg (IN / OUT)0:001:002:003:004:005:006:007:008:009:0010:0011:0012:0013:0014:0015:0016:0017:0018:0019:0020:0021:0022:0023:00Mon 08/27/12Tue 08/28/12Wed 08/29/1275% / 2%47% / 2%Thu 08/30/12Fri 08/31/12328mpls32.net.xyz.comBW: 44.0 MHrly Avg (IN / OUT)0:001:002:003:004:005:006:007:008:009:0010:0011:0012:0013:0014:0015:0016:0017:0018:0019:0020:0021:0022:0023:00Mon 08/27/12Tue 08/28/12Wed 08/29/12Thu 08/30/1233% / 32%26% / 42%17% / 30%7% / 41%49% / 4%Fri 08/31/12

Now I want to delete the records from the excel sheet based on the below criteria.
- blank lines with data should be deleted.
- % values within the 1 hr block over 30% between 7am - 8pm time
- 4 consecutive hour blocks over 30% between 7am - 8pm time
- The above criteria occurring at least 3 times within the week


Also attached the output file.

Could anyone please help me on this ?
# 2  
Old 09-14-2012
Does it have to be an excel sheet? A CSV file would be so much easier to deal with.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Summing up the data from different excel sheet into one excel sheet

Hi Folks, Can you please advise for any script in unix such that for example , i have 3 different excel sheet at the location /ppt/gfr/exc so the name s of the excel sheet are 1excel.xslx 2excel.xslx 3excel.xslx now in these 3 different excel sheet there is lot of data for example each... (3 Replies)
Discussion started by: punpun66
3 Replies

2. Shell Programming and Scripting

Perl : to get all the hyperlinks from the xlsx sheet(hyperlinks not visible in excel sheet directly)

Hi folks, I have a requirement in perl to print all the hyperlink from the spreadsheet(xlsx). Spreadsheet contains few lines of hyperlink data (pic attached). P.S. Hyperlink is behind the data and not visible in excel sheet directly. Now using perl script I need to copy the hyperlinks in... (3 Replies)
Discussion started by: scriptscript
3 Replies

3. Shell Programming and Scripting

Uploading excel sheet to sharepoint portal using perl

Thourgh Perl scripting, Is it possible to upload excel sheet to sharepoint portal ? If the answer is YES.. Could you please share your thoughts and required CPAN modules or any examples to proceed further? Regards, Giridhar S ---------- Post updated at 04:26 AM ---------- Previous update... (0 Replies)
Discussion started by: giridhar276
0 Replies

4. Shell Programming and Scripting

Perl Reading Excel sheet isssue

There is a perl scriptwhich will read Excel sheet and create one file(.v) . Excel sheet::: A B C D 1 cpu_dailog 2 3 4 Perl will create the file(.v) like thsi ::: assert (cpu_dailog_iso ==2) ; assert (cpu_dailog_reset ==3); assert (cpu_dailog_idle... (3 Replies)
Discussion started by: naaj_ila
3 Replies

5. Shell Programming and Scripting

Perl : not capturing all the data from excel sheet

Hi folks, I am working on assignment that captures all the records(2 columns one column contains names and other contain date of birth) from excel sheet stored in a directory and checks for current date and month. If it matches current date and month then the matched records are printed as... (1 Reply)
Discussion started by: giridhar276
1 Replies

6. Programming

Excel sheet modification using perl module

Hi , can any one tell me,"How to extract the same format from existing excel file to new excel file " using Spreadsheet::WriteExcel or Spreadsheet::ParseExcel module ??? Example_pgm: Below program is used to read existing excel file..In this program "my $cell = $_;" line is used to... (0 Replies)
Discussion started by: kavi.mogu
0 Replies

7. Shell Programming and Scripting

Excel sheet modification using perl module

Hi , Is there any possibility to read excel sheet in column by column order ?...Thanks in advance,........ :confused: (1 Reply)
Discussion started by: kavi.mogu
1 Replies

8. Shell Programming and Scripting

Excel sheet modification using perl module

I need to insert new column to already existing file ..can any one help me..?? (6 Replies)
Discussion started by: kavi.mogu
6 Replies

9. Shell Programming and Scripting

Excel sheet modification using perl module

Is there any possibility to move the content from one cell to another cell (Excel sheet) using perl module? (3 Replies)
Discussion started by: kavi.mogu
3 Replies

10. Shell Programming and Scripting

How to change cell background in excel sheet using perl

I need to change a cell in an excel sheet to different background color using perl.I tried SaveParse, but was unable to get it Please help regarding this. Thanks and Regards, Neelam G https://www.unix.com/images/misc/progress.gif (0 Replies)
Discussion started by: gujrathinr
0 Replies
Login or Register to Ask a Question