Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 230
BhaskarS Avatar asked Jan 01 '18 14:01

BhaskarS


2 Answers

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.

like image 186
Christopher Bottoms Avatar answered Nov 09 '22 11:11

Christopher Bottoms


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

like image 20
jubilatious1 Avatar answered Nov 09 '22 11:11

jubilatious1