in reply to OpenOffice Calc/Spreadsheets & Win32::OLE

Please look at the Spreadsheet::WriteExcel, it's 100% perl module to create .xls files. The good thing is that your code with it is portable to other platforms and you don't depend on com objects - meaning you don't need OpenOffice or MS Excel installed. Unless you need to use a functionality only specific to both software I'd definitely use Spreadsheet::WriteExcel, it even has charts :).

  • Comment on Re: OpenOffice Calc/Spreadsheets & Win32::OLE

Replies are listed 'Best First'.
Re^2: OpenOffice Calc/Spreadsheets & Win32::OLE
by dallen16 (Sexton) on Nov 02, 2010 at 01:24 UTC

    I've used Spreadsheet::WriteExcel as well as Win32:OLE to create Excel spreadsheet files (.xls). And over time, I've grown to prefer Win32::OLE to Spreadsheet::WriteExcel. For example, with Win32::OLE, you can use "AutoFit" to set the column width which is not available in Spreadsheet::WriteExcel. In Win32::OLE, you can set "AutoFilter"...

    The challenge is to create OpenOffice / StarOffice / Lotus Symphony format ".ods" files directly. Yes, it's certainly possible to create .xls files and then convert them using OpenOffice / StarOffice / Symphony to it's native ".ods" format but that's kinda cheating isn't it?

      Spreadsheet::WriteExcel isn't suitable for your task but to set the record straight you can use it to Autofit and Autofilter.

      --
      John.

      A .ods file is just a zip file, containing several files. One of them is an XML document containing the actual spreadsheet. Maybe it would be easier to read the documentation of the XML format or study some examples, and then create the XML file directly using some XML modules?