What Perl 6 modules can read/write XLSX files? [closed]
Asked Answered
B

2

5

Am trying to read and update some MS Excel (xlsx) files with Perl 6. What are the modules that I should be downloading?

I do see a Perl 6 writer by googling:

https://github.com/evanmiller/XLSX-Writer

Is this the one to use for writing?

I don't see any module that is Perl 6 specific for reading in XLSX. Is there some module for reading too?

Berthaberthe answered 1/1, 2018 at 14:50 Comment(0)
C
10

The short answer is no; there aren't currently any XLSX reading modules in Perl 6 (at least not that I know of).

However, do you really need to be using an XLSX format? If you could switch to using tab-delimited or csv-formatted files, I'd recommend that. I'm surprised by how often complicated formats are used for very simple data.

But if you must use XLSX, then I'd recommend using Perl 5 with one of its well known and well tested modules.

But if you must use Perl 6, then here's what little I know:

  1. For writing files, the XLSX::Writer Perl 6 module that you mention is "a wrapper for the libxlsxwriter C library", which just writes XLSX files, but cannot read them.

  2. For reading files

    a. You might try using XLSX Perl 5 modules via Inline::Perl5.

    b. You could try creating a Perl 6 wrapper for a C or C++ library such as XLSX I/O or xlnt.

If you come across or create a Perl 6 module that reads XLSX files, please post that information as an answer to your own question and notify me via a comment.

Cheer answered 1/1, 2018 at 15:50 Comment(2)
For CSV formatted files, there's Text::CSV in a native Perl 6 version.Tragedy
@ChristopherBottoms see below.Edwinedwina
E
2

Searching for "XLSX" on https://modules.raku.org/ with the query https://modules.raku.org/search/?q=XLSX you will discover the following two modules:

Spreadsheet::XLSX Work with Excel (XLSX) spreadsheets.
https://github.com/jnthn/spreadsheet-xlsx

AND

Spreadsheet::Libxlsxio An interface to libxlsxio, a C library to read and write XLSX files https://modules.raku.org/dist/Spreadsheet::Libxlsxio:cpan:FRITH
https://github.com/frithnanth/raku-Spreadsheet-Libxlsxio

NOTE:

These two modules can also be found on https://raku.land/ via the query https://raku.land/?q=XLSX

Edwinedwina answered 21/9, 2021 at 0:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.