2
votes

I have an existing excel(.xls) file with data. I need to read the data from the file and plot chart/graph based on the same data on the same sheet. Is there any methods in Spreadsheet::ParseExcel module to plot graph.

1

1 Answers

4
votes

You cannot use Spreadsheet::ParseExcel as it can just read excel files.

I would suggest you to read the excel data in and then try either of the following:

  1. Create another xls file and use the Spreadsheet::WriteExcel::Chart library.

  2. Create a xlsx file and use the Excel::Writer::XLSX::Chart library.

  3. Another close option would be to read the excel in with Spreadsheet::ParseExcel::SaveParser and then add the chart and save it, but with this module all original charts are lost.

  4. If you are on a Windows machine you may trying to use Win32::OLE.

This alternate SO post may be helpful: How can I modify an existing Excel workbook with Perl?