Re: Excel::Writer on OpenVMS

[email protected] ("Craig A. Berry") Thu, 29 Oct 2015 18:44:55 -0500
Newsgroups perl.vmsperl
Message-ID <[email protected]>
> On Oct 29, 2015, at 2:58 PM, Craig A. Berry <[email protected]> wrote:

> Now it runs but creates empty files.  I=E2=80=99ll have to look into =
that sometime but have to get back to real work at the moment.

Oh, for goodness sake, when are these messages ever going to make it =
through moderation and show up on list?

I got somewhat farther by setting this:

$ DEFINE DECC$FILENAME_UNIX_REPORT 1

and testing with [.examples]demo.pl, but the resulting file is corrupt.  =
Since an xlsx file is just a zip file containing a bunch of different =
Excel-specific files, you can examine its contents with unzip.  Here=E2=80=
=99s what=E2=80=99s in it when created on VMS:

$ unzip -l demo.xlsx
Archive:  demo.xlsx
  Length     Date   Time    Name
 --------    ----   ----    ----
      848  10-29-15 17:49   docProps/app.xml
      592  10-29-15 17:49   docProps/core.xml
      606  10-29-15 17:49   xl/sharedStrings.xml
     1992  10-29-15 17:49   xl/styles.xml
      652  10-29-15 17:49   xl/workbook.xml
     1018  10-29-15 17:49   xl/drawings/drawing1.xml
      291  10-29-15 17:49   xl/drawings/_rels/drawing1.xml.rels
     6263  10-29-15 17:49   xl/media/image1.png
     6995  10-29-15 17:49   xl/theme/theme1.xml
     1802  10-29-15 17:49   xl/worksheets/sheet1.xml
      438  10-29-15 17:49   xl/worksheets/sheet2.xml
      438  10-29-15 17:49   xl/worksheets/sheet3.xml
      460  10-29-15 17:49   xl/worksheets/_rels/sheet1.xml.rels
      979  10-29-15 17:49   xl/_rels/workbook.xml.rels
      587  10-29-15 17:49   _rels/.rels
 --------                   -------
    23961                   15 files

Here=E2=80=99s what=E2=80=99s in it when created on OS X:

$ unzip -l demo.xlsx
Archive:  demo.xlsx
  Length     Date   Time    Name
 --------    ----   ----    ----
     1609  10-29-15 18:02   [Content_Types].xml
      587  10-29-15 18:02   _rels/.rels
      848  10-29-15 18:02   docProps/app.xml
      592  10-29-15 18:02   docProps/core.xml
      606  10-29-15 18:02   xl/sharedStrings.xml
     1992  10-29-15 18:02   xl/styles.xml
      652  10-29-15 18:02   xl/workbook.xml
      979  10-29-15 18:02   xl/_rels/workbook.xml.rels
     1018  10-29-15 18:02   xl/drawings/drawing1.xml
      291  10-29-15 18:02   xl/drawings/_rels/drawing1.xml.rels
     6263  10-29-15 18:02   xl/media/image1.png
     6995  10-29-15 18:02   xl/theme/theme1.xml
     1802  10-29-15 18:02   xl/worksheets/sheet1.xml
      438  10-29-15 18:02   xl/worksheets/sheet2.xml
      438  10-29-15 18:02   xl/worksheets/sheet3.xml
      460  10-29-15 18:02   xl/worksheets/_rels/sheet1.xml.rels
 --------                   -------
    25570                   16 files

Nothing looks greatly amiss in the VMS version except that the oddly =
named file [Content_Types].xml is missing.  The file does exist in the =
temp directory on VMS:

$ dir/size [...]^[Content_Types^].xml;1

Directory MDA0:[CRAIG.SCRATCH.bGENbxoyB2]

^[Content_Types^].xml;1
                           3

Total of 1 file, 3 blocks.

so something is preventing that file from getting added to the zip/xlsx =
archive.  That=E2=80=99s got to be happening somewhere around here:

=
https://github.com/jmcnamara/excel-writer-xlsx/blob/master/lib/Excel/Write=
r/XLSX/Workbook.pm#L962

and needs further investigation.

________________________________________
Craig A. Berry
mailto:[email protected]

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser