in reply to xlsmerge - Merge worksheets from different Excel files into one Workbook

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re: xlsmerge - Merge worksheets from different Excel files into one Workbook

Replies are listed 'Best First'.
Re^2: xlsmerge - Merge worksheets from different Excel files into one Workbook
by Corion (Patriarch) on Jun 15, 2010 at 08:47 UTC

    Maybe you can suggest to me how I would write the description better:

    This script is a raw utility that I use to merge "information" and "data" sheets from different Excel workbooks. The basic syntax is as follows:
    xlsmerge -s -o results-%Y%m%d.xls info.xls:Information query_results.x +ls:Sheet1

    Maybe, if your operating system does not execute Perl programs directly, you want to use the following line:

    perl -w xlsmerge -s -o results-%Y%m%d.xls info.xls:Information query_r +esults.xls:Sheet1

    You don't tell us what you've tried and what problems you encountered, so it's hard to advise you further.

      Old thread, but wanted to share with other readers. Running command exactly as suggested created an empty results file. There is likely a bug in the script on line 24 and believe it's expecting a different format compared to what's suggested in the example by author.

      Solution is to NOT specify the sheet name after the semicolon.

      Simply run it as
      perl xlsmerge.pl -s -o results-%Y%m%d.xls File1.xls File2.xls

      I have a different question though. Is it possible to simply change the extension to csv in the source code and run this on csv files?

        No. This program only reads XLS files in the XLS file format.

        If you want to depend less on the format of your input files, I recommend using Spreadsheet::Read.