1.3.0 • Published 6 years ago

xlsx-load-node v1.3.0

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
6 years ago

Description

This is a project NodeJS / ES6 based that loads a file in XLSX format and inserts his content into a MySQL database

How to use

Usage

XLSX file (called 'XLSX')

There are an example XLSX file in ./files/BD_SAMPLE.xlsx

Filename

Name of the XLSX file (case-incensitive)

Worksheet

Name of the XLSX worksheet where is data (case-incensitive)

Columns

Name of the columns that contain the data (case-incensitive) See data types

MySQL

There are an example MySQL script file in ./files/bd_sample.sql

Database

Should be equals that XLSX file name (case-incensitive)

Table

Should be equals that XLSX worksheet (case-incensitive)

Columns

Should exists and be equals that XLSX columns (case-incensitive)

MySQL user credentials

Adds your MySQL Server credentials in this file

constantes.js

exports.configuracionBD = {
  HOST: "your_mysql_host",
  BD_USER: "your_mysql_user",
  BD_NAME: "your_mysql_db_name",
  BD_PASSWORD: "your_mysql_pwd",
  BD_PORT: your_mysql_port
}

Data Type

XLSX

In XLSX file is enought with store your data with General format

MySQL

In MySQL you could stote your data in a varchar field for all your data

Dependences

The project is 100% free to use for non-commercial purposes, If you use this project please give the respective credits to the author

To-do

  • Catch XLSX library errors and display them in the view
  • Improvements in Ajax calls on client-side
  • Show load statistics to the database when file is succesfully loaded

Licence

Apache 2.0