I want to append to an Excel spreadsheet. Win32::OLE works perfectly with this, but it doesn't work on Linux machines. Spreadsheet::WriteExcel doesn't seem to be able to append while it can work on both platforms. I found out about Excel::Writer::XLSX, but it reports that it does not have as many features as Spreadsheet...
I would also like to create hyperlinks, so clicking on some text will lead you to another sheet in the Excel workbook. Is this possible and on which one (Excelwriter/etc)?
So two questions: 1) What should I use so I can append to spreadsheets while working on both platforms?' 2) Is it possible to create hyperlinks to lead to other sheets and using which one?
Here is the code I used for Win32::OLE that appended a new worksheet:
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Excel';
print "Opening Excel...\n";
$Excel = Win32::OLE->GetActiveObject('Excel.Application')
|| Win32::OLE->new('Excel.Application', 'Quit');
#appending to existing excel file
my $book = $Excel->Workbooks->Open($full_name) || die "Error: Could not open Excel workbook";
#putting this sheet at the beginning
my $sheet = $book->Worksheets->Add({Before => $book->Worksheets(1)}) or die "Error: " . Win32::OLE->LastError;