Perl excel updating
Basically I need to script some things which require the XLS file to be updated.) Then I use a Powershell script that does the trick by : opening the Excel file, calling the macro, save and close the file.In this example I make a copy of the original file for security/backup purpose, but of course you could save the original file itself.After some misleading errors i read in the docs of the module: Ouch!when i realized was not possible i choosed that writing to an existing xls (old format file) would suffice for my tests and i ended with the following code.This is a simple syntax that writes a Perl program to create an MS Excel spreadsheet using perl's Spreadsheet:: Write Since I didn't know about tclperl I also wrote a small extension to load and eval perl code in tcl.
I have an Excel file that want to update and save automatically with out having to open it or manually interact with.
Additionally these scripts are not very portable since they rely heavily on the Excel settings embedded in each computers Excel installation.
The alternative is to export your perl data with a file using the excellent Text:: CSV and either import the data to the existing Excel manually (Data/From Text/File Name.csv) or do the same with a Macro or Power Shell.
It has come standard with the last few editions of Active Perl.
Moreover, you can write whole arrays into columns\rows at once and it affects the speed of writing.