[offers][chore] read from correct file while seeding

pull/501/head
Stuart Long Chay Boon 3 years ago
parent b443aaa0c9
commit 42f8678ca5

@ -1,8 +1,13 @@
// Requiring the module // const xlsxFile = require('read-excel-file/node');
const reader = require('xlsx')
// xlsxFile('/Users/stuartlong/Desktop/tech-interview-handbook/apps/portal/prisma/salaries.xlsx').then((rows) => {
// console.log(rows)
// })
const reader = require("xlsx")
// Reading our test file // Reading our test file
const file = reader.readFile('./test.xlsx') const file = reader.readFile('/Users/stuartlong/Desktop/tech-interview-handbook/apps/portal/prisma/salaries.xlsx')
let data = [] let data = []
@ -18,4 +23,5 @@ for(let i = 0; i < sheets.length; i++)
} }
// Printing data // Printing data
console.log(data) console.log(data.splice(0,100))
console.table(data.splice(0,100))
Loading…
Cancel
Save