Skip to content
This repository has been archived by the owner on Feb 25, 2021. It is now read-only.

Latest commit

 

History

History
27 lines (19 loc) · 1005 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 1005 Bytes

SQL2XLS

Queries a SQLExpress server instance and exports the result into a spreadsheet.

Usage

sql2xls /path/to/config.json

Where config.json is something like this:

{
	"username": "user",
	"password": "pass",
	"server"  : "localhost",
	"database": "SIGA",
	"output"  : "Customers.xls",
	"query"   : "SELECT * FROM Customers"
}

This will execute SELECT * FROM Customers and output the result to Customers.xls (relative to config.json). If omitted it will be set to config.xls (same name as the .json but with different extension)

If query is omitted, it will try to read config.sql instead (same name as the .json but with different extension). You can also specify which file to read by setting the read parameter.

Any parameter can be overwritten by passing an argument. For instance, executing query2xls /path/to/config.json --output another-file.xls will execute the config file exactly but with a different output file.