nodejs
nodejs
mark
一楼说的是保存脚本 save on device 二楼说的是保存工程 save project ...
Because your image file name ends with an English period (dot), when you save the file in Excel, it will automatically add another period (dot). So, the image file name...
``` const ext = path.extname(local_img_path).toLowerCase(); const extensionWithoutDot = ext.startsWith(".") ? ext.substring(1) : ext; const imageId = workbook.addImage({ buffer: imageBuffer, extension: extensionWithoutDot, type: "image", }); ```
match = entryName.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/);