CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [Zhris] How to append or prepend a string to a variable : Edit Log



Tejas
User

Nov 19, 2014, 12:40 AM


Views: 12952
Re: [Zhris] How to append or prepend a string to a variable

Hi Zhris

But i am also trying to read the a file , And depending on the input org, iam trying to write the excel sheet,
How can this be acheived


Code
open $gl_fh, '<', $gl_file or die "could not open $gl_fh <$!>";  
open $sl_fh, '<', $sl_file or die "could not open $sl_fh <$!>";
while (my $my_line = <$gl_fh>) {
my $Sheet = (split /,/, $my_line)[0];
$Sheet .= "_GL_Sheet";
my @gl_line = (split /,/, $my_line);
for(my $col=0 ;$col < scalar @gl_line ; $col++ ){
$Sheet->write_string ($gl_row, $col, $gl_line[$col],$frmt);
}
$gl_row++;
}


So Through bove code u ve posted, iam able to create 10 excel sheets.
But here i have a file with data in it
And depending on the Org(US,DE,...) value in that file, i have to write data to the correspondig worksheet.

IF ORG IS US , THEN I HAVE TO OPEN USE WORKBOOK AND WRITE DATA TO US WORKSHEET(Here all the names of work sheet are same (gl_shhe and sl_sheet))
How can this be acheived

I would like to have each woksheetwith its org or it ll be tough to find the excat worsheet where i can fill the data depending on th einput i get


(This post was edited by Tejas on Nov 19, 2014, 1:09 AM)


Edit Log:
Post edited by Tejas (User) on Nov 19, 2014, 12:47 AM
Post edited by Tejas (User) on Nov 19, 2014, 1:04 AM
Post edited by Tejas (User) on Nov 19, 2014, 1:09 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives