sql2xls goes cross-platform

Last year I released sql2xls, a free open-source tool which lets you throw a bunch of scripts into a folder, run them automatically against SQL Server and get the results back in a nicely-formatted Excel file, one tab per script.

A year later, I am happy to announce that the tool now runs cross-platform. You can compile and run it with .NET Core 3.1 LTS to run on Windows, macOS, and Linux. It uses the new Microsoft.Data.SqlClient library from NuGet, as well as the latest beta of ClosedXML.

Worth noting is that ClosedXML has a dependency on the System.Drawing library. If you use macOS, you will need to install mono-libgdiplus, and on Linux you’ll need libgdiplus. Scott Hanselman explains more in his post How do you use System.Drawing in .NET Core? if you’re curious.

Please visit the GitHub repository and give it a look. Here’s a sample of the output on macOS Catalina:

Please leave your thoughts in the comments below.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: