Labeo Labeo - 7 months ago 78
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 ,


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.