Code :
var xlsx = require("xlsx")
var fs = require('fs')
var dataPathExcelToRead = "Sample.xlsx"
var wb = xlsx.readFile(dataPathExcelToRead)
var sheetName = wb.SheetNames[0]
var sheetValue = wb.Sheets[sheetName]
var txtData = xlsx.utils.sheet_to_txt(sheetValue);
console.log(txtData);
fs.writeFile('excelReadFile.txt',txtData,function(err){
console.log("Data is saved no worries !!")
})
Next Steps :
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
Must Watch Playlists
► 1. Javascript - • Javascript Factory
► 2. Puppetter - • Puppeteer
► 3. Cypress - • Cypress
► 4. Tech works - • Video
► 5. Vbscript Basics To Advanced - • VBScript Part 1 - Features Advantage...
► 6. Jmeter - • Jmeter Tutorials
► 7. Excel - • Videos On Excel
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
#javascript
#exceltotxt
#createfilejavascript