Batch convert CSV to XLSX file

Hello,

is it possible, to batch convert csv files to xlsx files (excel) on a mac?
I don't have excel.

I can open the csv file in apple numbers and export it as an excel file.
But this is very time consuming, if I have to convert a lot of files.

Would be great to get some help.
Thank you!

I don't have excel

Use one of the free MS file-compatible apps like LibreOffice Calc ?

[Calc | LibreOffice - Free Office Suite - Based on OpenOffice - Compatible with Microsoft](Calc | LibreOffice - Free Office Suite - Based on OpenOffice - Compatible with Microsoft)

(Quicker, I suspect, than stringing some scripts and macros together)

I created a macro based on an AppleScript script. The script prompts you to select Numbers-compatible files and allows to choose from several legible formats. It puts converted files in the "Documents" folder. I created it using Numbers 3.2.2 in OS X Mavericks, KM 6.4.8, but updated to work with Mojave and the relevant version of Apple Numbers. It includes small chunks of GUI scripting which is prone to errors when the GUI structure changes between releases of macOS (especially now that Big Sur is available), however I don't expect the part I added to evolve significantly by the current generation of the OS to the point of crashing the macro. If the crashes do occur, return and update me.

Updated 2020-11-18T20:20:00Z

I re-wrote the AppleScript to allow for different versions of macOS with regard to the GUI segment corrected for macOS Mojave 10.14.6. I don't run newer iterations of macOS and can't adjust the macro appropriately, so if you run into unintended behaviour your should figure out on your own: it shouldn't pose additional problems since you have the framework along which you work it out.
The macro is now triggered with the hot keys ⌃⌥⇧⌘P by default. You can assign different ones.

IMPORTANT: make sure the macro group which the installed macro goes to is enabled otherwise you'll be able to run it only from within Keyboard Maestro Editor.

Convert selected spreadsheets into another format.kmmacros (5.3 KB)