in reply to Editing an existing excel
You can't edit an Excel file using Excel::Writer::XLSX - you can only create a new empty one and write to it. You can read an existing file using Spreadsheet::ParseXLSX but again, you can't edit.
You can create charts using Excel::Writer::XLSX (see Excel::Writer::XLSX::Chart) but I can't see a histogram there, only bar charts.
In Section
Seekers of Perl Wisdom