I think my recent changes to csv2xlsx warrants an update.

As this is on github but not yet released, feel free to comment on the new -S/--split feature, so I can update the docs or amend the code.

To explain the new options: I was faced with a 50_000 line CSV file that had logical vertical sections. The section start was clearly marked. Say you have a CSV file with orders per customer, grouped by customer, and every such section starts with Customer,34526,"Foo Tool Factory",20220601,... followed by the orders.

What I wanted was to convert this CSV to Excel (as required by the other end) where each customer had its own sheet. With the new options that would be:

$ csv2xlsx -S A=Customer --sl=C orders.csv

Start a new sheet when column A is "Customer" and then use the value in column C for the matching record as label for the sheet.

-S (or --split) also supports syntax for regex/empty/undef/compare and can be stacked.

Here are the highlights of changes since my previous posts:

1.49 - 2022-06-21

1.48 - 2022-05-24

1.47 - 2021-12-21

1.46 - 2021-03-24

1.45 - 2020-12-24


Enjoy, Have FUN! H.Merijn

In reply to Re: The future of Text::CSV_XS - TODO by Tux
in thread The future of Text::CSV_XS - TODO by Tux

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.