Thanks sir for replying back pon my post yesterday .I read your question and one query strike in my curious mind is that , 'As per your reply I am not getting rights to generate an excel file but when I execute the same program in command line then I can generate the excel file at the same location where I am running that script Why is it so ?'
Comment on Re^2: @ generating Excel Attachment using Perl
Are you running the script at the command prompt as the same user your webserver (apache?) is running as? Read and understand Ovid's CGI Course - Resurrected and Updated! which explains such issues.