fix: Russian records cannot be exported to Excel file (#32)

This commit is contained in:
mio 2023-09-24 11:40:57 +08:00
parent 89a0553c59
commit 49c1685e5e
2 changed files with 2 additions and 2 deletions

@ -1,6 +1,6 @@
{ {
"name": "star-rail-warp-export", "name": "star-rail-warp-export",
"version": "0.1.3", "version": "0.1.4",
"main": "./dist/electron/main/main.js", "main": "./dist/electron/main/main.js",
"author": "biuuu <https://github.com/biuuu>", "author": "biuuu <https://github.com/biuuu>",
"homepage": "https://github.com/biuuu/star-rail-warp-export", "homepage": "https://github.com/biuuu/star-rail-warp-export",

@ -57,7 +57,7 @@ const start = async () => {
const workbook = new ExcelJS.Workbook() const workbook = new ExcelJS.Workbook()
for (let [key, value] of data.result) { for (let [key, value] of data.result) {
const name = data.typeMap.get(key) const name = data.typeMap.get(key)
const sheet = workbook.addWorksheet(name, {views: [{state: 'frozen', ySplit: 1}]}) const sheet = workbook.addWorksheet(name.replace(/[*?:\/\\]/g, ' '), {views: [{state: 'frozen', ySplit: 1}]})
let width = [24, 14, 8, 8, 8, 8, 8] let width = [24, 14, 8, 8, 8, 8, 8]
if (!data.lang.includes('zh-')) { if (!data.lang.includes('zh-')) {
width = [24, 32, 16, 12, 12, 12, 8] width = [24, 32, 16, 12, 12, 12, 8]