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.
2
votes
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:
Create another xls file and use the
Spreadsheet::WriteExcel::Chartlibrary.Create a xlsx file and use the
Excel::Writer::XLSX::Chartlibrary.Another close option would be to read the excel in with
Spreadsheet::ParseExcel::SaveParserand then add the chart and save it, but with this module all original charts are lost.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?