News WordPress Theme

How to Convert an Excel File into PDF | HTML to PDF using JavaScript | Saving PDF using Puppeteer

How to Convert an Excel File into PDF | HTML to PDF using JavaScript | Saving PDF using Puppeteer

Code : const puppeteerVar = require(‘puppeteer’) var xlsx = require(“xlsx”) var fs = require(‘fs’) describe(‘Title : Convert Excel To PDF’,()=(greather than){ it(‘Test Case : Convert Excel To PDF’, async function(){ const browser = await puppeteerVar.launch({headless:true, slowMo:500}) const page = await browser.newPage(); var dataPathExcelToRead = “Sample.xlsx” var wb = xlsx.readFile(dataPathExcelToRead) var sheetName = wb.SheetNames var htmlData…

Read More

Excel Macros with JavaScript & Node JS – Read Excel File to JSON, convert excel file into JSON

Excel Macros with JavaScript & Node JS – Read Excel File to JSON, convert excel file into JSON

Requirements 1. Node must be installed 2. Java must be installed 3. xlsx pakage must be installed 4. Visual Studio code is optional Code : var xlsx = require(“xlsx”) var dataPathExcel = “testExcel.xlsx” var wb = xlsx.readFile(dataPathExcel); var sheetName = wb.SheetNames; //console.log(sheetValue); var excelData = xlsx.utils.sheet_to_json(sheetValue); console.log(excelData); 0:00 – Introduction to the video 0:24 –…

Read More