Go4Expert (http://www.go4expert.com/)
-   Perl (http://www.go4expert.com/forums/perl/)
-   -   Regarding 2 excel files merging (http://www.go4expert.com/forums/regarding-2-excel-files-merging-t8173/)

sriv 9Jan2008 12:41

Regarding 2 excel files merging
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 ----------------------------------------

print "Content-Type: application/vnd.ms-excel\n\n";
        if(-e "/tmp/$FILE") {
                open(XLS, "/tmp/$FILE") || die("Error: $FILE no longer exists!");
                while(<XLS>) {
                        print $_;
                close XLS;

                unlink("/tmp/$FILE") if(-e "/tmp/$FILE");



pradeep 9Jan2008 15:39

Re: Regarding 2 excel files merging
XLS or spreadsheet files are binary files, which you cannot merge together like text files. You'll need to use some spreadsheet module to first read the two XLS files and again recreate the merged data! http://search.cpan.org/author/HMBRAN...d-0.25/Read.pm

sriv 9Jan2008 18:21

Re: Regarding 2 excel files merging
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?

XXxxImmortalxxXX 7Jul2008 14:30

Re: Regarding 2 excel files merging
what the **** bann this bitch this guy is pissing me off gprunescape22

shabbir 8Jul2008 10:03

Re: Regarding 2 excel files merging
He tried to spam and could not and so was testing with some good posts as to why my spams are not getting displayed.

go4417 19Sep2009 22:21

Re: Regarding 2 excel files merging
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.

All times are GMT +5.5. The time now is 15:57.