in reply to Text file to Excel with perl

Your posted code doesn't indicate that you're doing any manipulation of the data. Is that correct, or did you leave out that portion of your code?

Excel knows how to import csv (or pipe delimited) files. Have you tried opening the file directly in excel? If so, will it load properly?

How big is the file? If the resulting excel file is over 7MB, Spreadsheet::WriteExcel will require the use of the OLE::Storage_Lite module. Do you have that module installed?