Labeo Labeo - 1 year ago 274
Javascript Question

how to import excel file (XLSX) to mysql using nodejs

I am trying to import data in excel file to mysql just like row colon using nodejs
are there any references i can learn or any module in nodejs that does my work or any sample code

I have searched in google but i have seen solutions for only mongodb and for python ,

Answer Source

A few methods which come to my mind:

  1. Save the excel sheet(s) you want to import in csv format, and then import them into mysql : cf. How to import CSV file to MySQL table By far the simplest method, but you might run into trouble with quotes and commas and other idiosyncrasies.

  2. use an javascript excel parser to read the excel file and perform directly with code the update in your mysql database : cf. That option is more complex but it allows you to automate the task should you have many files to copy.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download