const fs = require("fs");
const AdmZip = require('adm-zip'); // Import view zip Package of files
let chooser = document.getElementById("readFile");
chooser.addEventListener("change", function (evt) {
let filePath = this.value.toString();
document.querySelector("p").innerHTML = " Read file from " + filePath;
const zip = new AdmZip(filePath); //filePath Is the file path
let contentXml = zip.readAsText("word/document.xml");// take document.xml Read as text Content ;
let str = "";
contentXml.match(/<w:t>[\s\S]*?<\/w:t>/ig).forEach((item)=>{
str += item.slice(5,-6)}
);
console.log(str)
})
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
I think it's helpful for you to like it in the upper right corner ~
Scan the QR code above for my subscription number ~