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"); } -----------------------------------------------------------------------------------
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/HMBRAND/Spreadsheet-Read-0.25/Read.pm
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?
He tried to spam and could not and so was testing with some good posts as to why my spams are not getting displayed.
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.