Hi Friends,
I got the solution for the problem. I need to convert the file handle to binmode before processing
User Profile
Collapse
-
Perl read() & write() with File Handle
Hi Friends,
I am trying to write a script to split file with the size as an argument.
Based on the size, i am trying to read for Input File & Dump it to output File.
But, read() returns the number of bytes actually being read (for ex : file split size as 200 bytes), while printing, output file size is greater(213 bytes) than actual read. I could not guess the reason. Please help me with this. -
Sorry Friends, Its a code problem, Instead of doing Exact Match (Ex. 21) , i was doing Match Operation.Leave a comment:
-
Perl OLE Excel Strange Problem
Hi Friends,
I am facing a strange problem while using WIN32::OLE for Excel Operations.
I am searching a string in log file & if string matches in excel, i am asigining values to certain cells from log file further parsing with certain conditions!
Everything goes fine except with Numbers.
Code:if(m/.*\|TEST PARAM\|:: (.*) ::/){ $Sheet -> Range("$TestParam$j") -> {Value}
-
Perl OLE Open Existing Workbook & Worksheet
Hi Friends,
I am trying to open particular Worksheet from MS Excel workbook (WIN32 :: OLE).
I cannot able to work on particular sheet. Please help me on this :
Code:$Excel = Win32::OLE->GetActiveObject('Excel.Application'); $Excel->{'Visible'} = 0; $Excel->{DisplayAlerts}=0; # Open File and WorkSheet $Book = $Excel->Workbooks->Open("d:\test.xls");
-
Thanks Miller. I had used alternative way as per my use case.(with some limitations)
But yours will be applied in broader manner.Leave a comment:
-
Miller,
At the begining i mentioned that i am working in Excel.
The Excel Cells Starts from 'A' & it goes like AA - AZ, BA - BZ & so on.. This is my Use case!
Hope it will narrow your ideas.Leave a comment:
-
Thanks Guys for your Awesome Response!!!
RonB,
I accept that. But even with this option i have a problem:
my $letter = 'A';
my $test;
for ($i = 1; $i <= 100; $i++){
$test = chr(ord($letter ));
print "Orig Char : $letter; Exp Char : $test\n";
$letter++;
}
This will fine upto 26 (A to Z), After 26th Iteration, $letter will become...Leave a comment:
-
Thanks Miller.
But Folks, any idea on Arithmetic Operation with Strings?
Ex : I can do auto increment of string : my $a = 'A';
$a ++ ; #Will give 'B'
Like that, i want to do : $a += 5 ; #I expect 'F', but perl throws error on this. Any idea on my thing?Leave a comment:
-
Hi Miller,
Thanks for your Interest & I found the answer.
Code:"=IF(RC[$prev]>RC[$curr],RC[$prev]-RC[$curr],\"PASS\")"
Last edited by miller; Apr 1 '11, 08:01 PM.Leave a comment:
-
Perl - Win32::OLE - Excel Formulas
I am a Perl Programmer & i am using WIN32::OLE for Excel operations.
I wanted to use conditional formulas like 'if' in excel via Perl.
Thanks in Advance.
No activity results to display
Show More
Leave a comment: