Regarding 2 excel files merging

Discussion in 'Perl' started by sriv, Jan 9, 2008.

  1. sriv

    sriv New Member

    Joined:
    Dec 18, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Hi i am using the following code to display the .XLS file

    if i want to display the content from 2 .XLS files in a single output file then what should i do
    can any one please help?
    in the below code if i want to display the conetent from both $FILE and $FILE2 then how?
    ------------------------------ code ----------------------------------------
    Code:
    print "Content-Type: application/vnd.ms-excel\n\n";
        binmode(STDOUT);
    	if(-e "/tmp/$FILE") {
    		open(XLS, "/tmp/$FILE") || die("Error: $FILE no longer exists!");
    		binmode(XLS);
    		while(<XLS>) {
    			print $_;
    		}
    		close XLS;
    
    		unlink("/tmp/$FILE") if(-e "/tmp/$FILE");
    
    	}
    -----------------------------------------------------------------------------------
     
    Last edited by a moderator: Jan 9, 2008
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
  3. sriv

    sriv New Member

    Joined:
    Dec 18, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    thanks pradeep.
    is there any other way by using UNIX commands in the server to merge two XLS files?so that we can use 'system()' function to execute that unix command in perl script.

    actually what happened is i am using Spreadsheet module for showing the data from databse in excel sheet in a formated way.
    it is working for for rows less than 30000 from database .... if the rows are greater than 30000 then creating empty excel sheet.
    so i have written a programme like splitting the records in to number of XLS files when the data is more than 30000 rows...
    so now i need to show these files data as single output file data to the user.

    can u please suggest how can i do this?
     
  4. XXxxImmortalxxXX

    XXxxImmortalxxXX New Member

    Joined:
    Jun 27, 2007
    Messages:
    561
    Likes Received:
    19
    Trophy Points:
    0
    what the **** bann this bitch this guy is pissing me off gprunescape22
     
  5. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    He tried to spam and could not and so was testing with some good posts as to why my spams are not getting displayed.
     
  6. go4417

    go4417 New Member

    Joined:
    Sep 19, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    There is software that can handle this merge. We use Excel File Merger to vertically append 439 .xls files into one master file. The windows version of the app is called Bulk File Merger.

    The program will also merge doc files, merge pdf files, even txt and csv files.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice