1.4.6 • Published 6 months ago
excel-database v1.4.6
ExcelDatabase
A lightweight library for managing Excel files as databases in Node.js, built with TypeScript.
Features
- CRUD Operations: Perform create, read, update, and delete operations on Excel files.
- Column Lookup: Search rows by column values and fetch specific column values.
- TypeScript Support: Fully typed for better development experience.
Installation
Install the library via npm:
npm install excel-database
Usage
Import and Initialize
import { ExcelDatabase } from 'excel-database';
const db = new ExcelDatabase('path/to/your/file.xlsx');
// Default sheet name is 'Sheet1'. You can specify a custom sheet name:
const dbWithCustomSheet = new ExcelDatabase('path/to/your/file.xlsx', 'CustomSheetName');
CRUD Operations
Select
const results = db.select({ columnName: 'value' });
console.log(results);
Insert
db.insert({ columnName: 'newValue', anotherColumn: 123 });
Update
db.update({ columnName: 'value' }, { columnName: 'updatedValue' });
Delete
db.delete({ columnName: 'value' });
Get Column Value
const value = db.getColumnValue('searchColumn', 'searchValue', 'targetColumn');
console.log(value);
More CRUD Operations
Example
Example code is here
Contributing
Please submit issues or pull requests via GitHub.
License
This project is licensed under the MIT License. See the LICENSE file for details.
1.4.6
6 months ago
1.4.5
6 months ago
1.4.4
6 months ago
1.4.3
6 months ago
1.4.2
7 months ago
1.4.1
7 months ago
1.4.0
7 months ago
1.3.8
7 months ago
1.3.7
7 months ago
1.3.6
7 months ago
1.3.5
7 months ago
1.3.4
7 months ago
1.3.3
7 months ago
1.3.2
7 months ago
1.3.1
7 months ago
1.3.0
7 months ago
1.2.5
7 months ago
1.2.4
7 months ago
1.2.3
7 months ago
1.2.2
7 months ago
1.2.1
7 months ago
1.1.1
7 months ago
1.1.0
7 months ago
1.0.0
7 months ago