mirror of
https://github.com/ljcoder2015/obsidian-excel.git
synced 2026-07-22 08:30:28 +00:00
fix: import excel bug
This commit is contained in:
parent
1bb57398d2
commit
578a3388c6
2 changed files with 7 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "excel",
|
||||
"name": "Excel",
|
||||
"version": "1.3.19",
|
||||
"version": "1.3.20",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Create spreadsheets and easily embed them in Markdown",
|
||||
"author": "ljcoder",
|
||||
|
|
|
|||
|
|
@ -102,6 +102,12 @@ export class ExcelView extends TextFileView {
|
|||
process_wb(wb: XLSX.WorkBook) {
|
||||
const sheetData = stox(wb);
|
||||
if (sheetData) {
|
||||
sheetData.forEach((sheet) => {
|
||||
if (sheet.rows) {
|
||||
const last = Object.keys(sheet.rows).last() || "100"
|
||||
sheet.rows.len = Math.max(100, parseInt(last) + 20)
|
||||
}
|
||||
})
|
||||
this.sheet.loadData(sheetData)
|
||||
this.saveData(JSON.stringify(sheetData))
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue