# mssql-to-csv

> Node.js module to export MS SQL database to CSV

Latest version **1.1.0** (published 2016-09-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install mssql-to-csv
pnpm add mssql-to-csv
yarn add mssql-to-csv
bun add mssql-to-csv
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2016-09-21 |
| First published | 2016-02-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Adnan Kamili |
| Maintainers | adnan.kamili |
| Keywords | mssql, csv, export |

## Links

- npm: https://www.npmjs.com/package/mssql-to-csv
- Repository: https://github.com/adnan-kamili/mssql-to-csv
- Homepage: https://github.com/adnan-kamili/mssql-to-csv#readme
- Issues: https://github.com/adnan-kamili/mssql-to-csv/issues
- npm.io page: https://npm.io/package/mssql-to-csv

## Dependencies (2)

- [mssql](https://npm.io/package/mssql.md) ^3.0.1
- [fast-csv](https://npm.io/package/fast-csv.md) ^1.0.0

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 1.1.0 (latest) — 2016-09-21
- 1.0.0 — 2016-02-04

## README

# mssql-to-csv
Node.js module to export MS SQL database to CSV

## Installation

  npm install mssql-to-csv --save

## Usage
```javascript
    var mssqlExport = require('mssql-to-csv')

    // All config options supported by https://www.npmjs.com/package/mssql
    var dbconfig = {
        user: 'username',
        password: 'pass',
        server: 'servername',
        database: 'dbname',
        requestTimeout: 320000,
        pool: {
            max: 20,
            min: 12,
            idleTimeoutMillis: 30000
        }
    };

    var options = {
        ignoreList: ["sysdiagrams"], // tables to ignore
        tables: [],                  // empty to export all the tables
        outputDirectory: 'somedir',
        log: true,
        header: false                // true to export column names as csv header
    };

    mssqlExport(dbconfig, options).then(function(){
        console.log("All done successfully!");
        process.exit(0);
    }).catch(function(err){
        console.log(err.toString());
        process.exit(-1);
    });
```

---
_Source: https://npm.io/package/mssql-to-csv · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
