Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Script to append values into excel sheet, zip and send mail

by marto (Cardinal)
on Dec 01, 2016 at 15:35 UTC ( [id://1177053]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1177053]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2026-04-23 03:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.