in reply to Script to append values into excel sheet, zip and send mail

system("$worksheet->write_col('C1', \@CommitDetails)");

No, you don't use system for this, the line which follows is on the right track.

"when i'm executing the above code, zip file is creating only with empty excel file."

You also want to read the module documentation carefully, e.g. close:

"An explicit close() is required if the file must be closed prior to performing some external action on it such as copying it, reading its size or attaching it to an email."

For emailing including attachments I use MIME::Lite frequently without issue. Some general points:

Replies are listed 'Best First'.
Re^2: Script to append values into excel sheet, zip and send mail
by karthik.raju (Acolyte) on Dec 02, 2016 at 04:35 UTC
    Hi Marto,

    Thank you very much for your answer,
    by adding close() the script is working fine.
    and i'm able to send the mails with format .txt, .pdf and .zip but i'm not able to send the excel files, so i'm zipping the excel files and sending through mail.
    Thanks,
    Karthik

      I'm glad that worked, however since you don't show us how you're sending the email nobody can help. The method I suggested should not have any issues sending any type of file.