Node.js: Read from Excel File

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 พ.ค. 2021
  • In this video we show how you can read data from an excel file using node.js.
    --------------------------------------------------------------------------------------------------------------
    📚 If you want to get better in tech, check out my courses on Udemy with *35% Discount*.
    Use Coupon Code "*TH-cam*" or click the links below!
    🎓 Mastering PostgreSQL: Learning By Real Examples
    www.udemy.com/course/masterin...
    🎓 PostgreSQL: The Ultimate Exam
    www.udemy.com/course/postgres...
    🎓 Algorithm and Data Structures: The Ultimate Exam
    www.udemy.com/course/algorith...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 19

  • @datboi765
    @datboi765 ปีที่แล้ว +3

    That's what I wanted. Searched for this for hours for such a simple thing. Thanks

  • @kaigoat5265
    @kaigoat5265 2 ปีที่แล้ว +1

    Thank u so much, i like short and clear videos, so helpfull

  • @celine.3749
    @celine.3749 2 ปีที่แล้ว

    Thank you for making this video, it really helps me

  • @chrisyemenijian6039
    @chrisyemenijian6039 2 ปีที่แล้ว

    Thanks! This was very useful

  • @lopezrunco
    @lopezrunco 2 ปีที่แล้ว +2

    Very useful!

  • @Abhi-ow6xe
    @Abhi-ow6xe ปีที่แล้ว

    Thanks very useful

  • @souravsinha5330
    @souravsinha5330 ปีที่แล้ว

    Thanks a lot !!!

  • @NIRAJKUMAR-ri9jb
    @NIRAJKUMAR-ri9jb 2 ปีที่แล้ว +2

    Why you have used .v in the for loop ?

  • @negociosonline40
    @negociosonline40 3 ปีที่แล้ว

    how to import excel data and insert into a js file?

  • @handlebest
    @handlebest 11 หลายเดือนก่อน

    pal, do u know how to read ole object like images, .docx files, .pdf files that attached inside an xlsx file?

  • @bijeyta1028
    @bijeyta1028 2 ปีที่แล้ว

    Can we do reverse of this i.e fetching terminal data to Msexcel

  • @poojaj8081
    @poojaj8081 ปีที่แล้ว

    how to get only value of json array

  • @dasarisahith3540
    @dasarisahith3540 ปีที่แล้ว +1

    for me it is getting error as .v is undefined

  • @singiri697
    @singiri697 4 หลายเดือนก่อน

    Can you give this code?

    • @felipevasconcelos869
      @felipevasconcelos869 4 หลายเดือนก่อน

      var XLSX = require("xlsx");
      var workbook = XLSX.readFile('C:/Users/Conferente/Documents/excel/arquivo.xlsx');
      let worksheet = workbook.Sheets[workbook.SheetNames[0]];
      for(let i = 2; i < 7; i++){
      const id = worksheet[`A${i}`].v;
      const name = worksheet[`B${i}`].v;
      console.log({
      id:id, name:name})
      }

  • @felipevasconcelos869
    @felipevasconcelos869 4 หลายเดือนก่อน

    my code erro
    C:\Users\Conferente\Documents\curso> node ./index.js
    { id: 200, name: 'felipe' }
    C:\Users\Conferente\Documents\curso\index.js:7
    const id = worksheet[`A${i}`].v;
    ^
    TypeError: Cannot read properties of undefined (reading 'v')
    at Object. (C:\Users\Conferente\Documents\curso\index.js:7:31)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49

  • @felipevasconcelos869
    @felipevasconcelos869 4 หลายเดือนก่อน

    my code erro C:\Users\Conferente\Documents\curso> node ./index.js
    { id: 200, name: 'felipe' }
    C:\Users\Conferente\Documents\curso\index.js:7
    const id = worksheet[`A${i}`].v;
    ^
    TypeError: Cannot read properties of undefined (reading 'v')
    at Object. (C:\Users\Conferente\Documents\curso\index.js:7:31)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49