Copy Data from CSV file to Excel Sheet using Perl

Hi All, Firstly I will like to wish A Happy New Year to all.
Now my issue is
I have one csv file say(data.csv) and one excel file say(result.xls)
The result.xls contains two sheet name Sheet1 and Sheet2, Now What I am trying to do is to First I want to delete that data of Sheet2 if present any, then after that I want to copy the data from data.csv file to result.xls in Sheet2. I have searched many modules but could not find a solid answer

PERL has both CSV and XLS handling capabilities. Google overflows with examples: Delete a sheet from Excel

Of course, you might want to just delete the sheet 2 cell contents and then put in new cells.

CSV to Excel Converter

Hi, This is creating the new excel file and then writing into it, But what I want is I have a already existing excel, in which I want to write

---------- Post updated at 06:30 AM ---------- Previous update was at 12:50 AM ----------

Hi I have done the task, But one issue I am getting, I have one excel file which contains two sheets named Sheet1 and Sheet2,
Basically on Sheet1 there is some pivot formulas are applied by taking the data range from Sheet2, when I update the Sheet 2 with new data with the help of Perl The formulas on Sheet1 goes blanks.
How to avoid such type of condition

I would think the 'paste-specia-valuesl' command within Excel would help with your problem. Not sure if that can be done externally, from Perl or other scripts, however.

It will be better if you explain with the help of example
and how paste-special values command will work with Perl

As I said

But, I often use the paste-special-values option within Excel when working with complex formulas and analysis across multiple worksheet tabs. This seems to work best at keeping all my other formulas in-tact and not automatically adjusting them.

So... not sure how to do externally from a unix perl script. Perhaps the perl script could start an Excel macro that would then do the paste-special-values.

spreadsheet - How can I modify an existing Excel workbook with Perl? - Stack Overflow deals with updates, but it is sometimes a better idea to make a new spreadsheet, save the old one and move the new one into its place. What if, for some reason, the updated copy is not viable?

Also, there is a new, upwards compatible library: Spreadsheet::WriteExcel is dead. Long live Excel::Writer::XLSX. - Perlbuzz