Compare commits

...

22 commits

Author SHA1 Message Date
ljcoder
d9df140382
Update README.md 2024-06-04 15:27:46 +08:00
雷军
04dc273d80 feat: readme 2024-05-08 14:59:00 +08:00
雷军
5e149efaa7 feat: readme 2024-05-06 18:29:15 +08:00
雷军
583c46a828 feat: readme 2024-05-06 18:24:21 +08:00
雷军
5397aade29 feat: excel plus readme 2024-05-06 14:50:12 +08:00
雷军
82a6a7d1f9 feat: excel plus readme 2024-05-06 14:48:55 +08:00
雷军
56ca68dde1 feat: excel plus readme 2024-05-06 14:47:50 +08:00
雷军
5380c7a6e9 feat: Obsidian Excel Pro Plugin doc 2024-04-29 11:24:25 +08:00
雷军
b018f956a7 feat: Obsidian Excel Pro Plugin doc 2024-04-29 11:20:50 +08:00
雷军
ff08a53c06 feat: Obsidian Excel Pro Plugin doc 2024-04-29 11:19:15 +08:00
雷军
05ea79123b feat: Obsidian Excel Pro Plugin doc 2024-04-29 11:17:35 +08:00
雷军
2135848b38 feat: 1.3.24 2024-03-20 10:45:10 +08:00
雷军
8d2a44df50 feat: 1.3.23 2024-02-18 15:00:40 +08:00
雷军
34f35f9822 feat: github action 2024-02-18 15:00:01 +08:00
雷军
42cbe19ad0 feat: github action 2024-02-18 14:03:22 +08:00
雷军
6dc364519b feat: selected all 2024-02-18 13:49:48 +08:00
雷军
9898398afc feat: selected all 2024-02-18 10:48:51 +08:00
雷军
ae4426b24f fix: input hidden 2023-12-29 11:04:28 +08:00
雷军
0346ab7ca3 feat: add sheet default rows stting 2023-12-29 10:57:11 +08:00
雷军
63c041ba05 feat: add sheet default rows stting 2023-12-29 10:54:09 +08:00
雷军
a1c620d4e2 fix: import excel bug 2023-12-29 10:27:56 +08:00
雷军
578a3388c6 fix: import excel bug 2023-12-29 10:20:28 +08:00
13 changed files with 2345 additions and 498 deletions

View file

@ -19,6 +19,7 @@ jobs:
- name: Build plugin
run: |
npm config set strict-ssl false
npm install
npm run build

View file

@ -1,3 +1,6 @@
> ### The Obsidian-Excel plugin will no longer be maintained or updated. To download Obsidian-Sheet-Plus, please visit [https://github.com/ljcoder2015/obsidian-sheet-plus](https://github.com/ljcoder2015/obsidian-sheet-plus)
> ### Obsidian-Excel插件不再更新维护旧功能不满足可以尝试使用新插件Obsidian-Sheet-Plus。下载地址 [https://github.com/ljcoder2015/obsidian-sheet-plus](https://github.com/ljcoder2015/obsidian-sheet-plus)
# Obsidian Excel Plugin
## Excel
@ -49,4 +52,7 @@ embed link rule:
- ljcoder@163.com
### buy a Coffee
[https://ko-fi.com/ljcoder](https://ko-fi.com/ljcoder)

File diff suppressed because one or more lines are too long

View file

@ -1,10 +1,11 @@
{
"id": "excel",
"name": "Excel",
"version": "1.3.19",
"version": "1.3.24",
"minAppVersion": "0.15.0",
"description": "Create spreadsheets and easily embed them in Markdown",
"author": "ljcoder",
"authorUrl": "https://github.com/ljcoder2015",
"fundingUrl": "https://ko-fi.com/ljcoder",
"isDesktopOnly": false
}

2771
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -28,7 +28,7 @@
},
"dependencies": {
"monkey-around": "^2.3.0",
"x-data-spreadsheet": "git+ssh://git@github.com:ljcoder2015/x-spreadsheet.git#1.1.3",
"x-data-spreadsheet": "git+ssh://git@github.com:ljcoder2015/x-spreadsheet.git#1.1.4",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.0/xlsx-0.20.0.tgz"
}
}

View file

@ -115,6 +115,32 @@ export class ExcelSettingTab extends PluginSettingTab {
})
)
new Setting(containerEl)
.setName(t("DEFAULT_ROWS_LEN"))
.setDesc(t("DEFAULT_ROWS_LEN_DESC"))
.addText((text) =>
text
.setPlaceholder("100")
.setValue(this.plugin.settings.defaultRowsLen)
.onChange(async (value) => {
this.plugin.settings.defaultRowsLen = value
this.plugin.saveSettings()
})
)
new Setting(containerEl)
.setName(t("DEFAULT_COLS_LEN"))
.setDesc(t("DEFAULT_COLS_LEN_DESC"))
.addText((text) =>
text
.setPlaceholder("26")
.setValue(this.plugin.settings.defaultColsLen)
.onChange(async (value) => {
this.plugin.settings.defaultColsLen = value
this.plugin.saveSettings()
})
)
new Setting(containerEl)
.setName(t("SHOW_SHEET_BUTTON"))
.setDesc(t("SHOW_SHEET_BUTTON_DESC"))

View file

@ -102,8 +102,16 @@ export class ExcelView extends TextFileView {
process_wb(wb: XLSX.WorkBook) {
const sheetData = stox(wb);
if (sheetData) {
this.sheet.loadData(sheetData)
sheetData.forEach((sheet) => {
var sheetAny = sheet as any
if (sheetAny.rows) {
const last = Object.keys(sheetAny.rows).last() || "100"
const max = parseInt(this.plugin.settings.defaultRowsLen)
sheetAny.rows.len = Math.max(max, parseInt(last) + 20)
}
})
this.saveData(JSON.stringify(sheetData))
this.refresh()
} else {
new Notice(t("DATA_PARSING_ERROR"));
}
@ -241,11 +249,11 @@ export class ExcelView extends TextFileView {
width: () => this.contentEl.clientWidth - 32,
},
row: {
len: 100,
len: parseInt(this.plugin.settings.defaultRowsLen),
height: parseInt(this.plugin.settings.rowHeight),
},
col: {
len: 26,
len: parseInt(this.plugin.settings.defaultColsLen),
width: parseInt(this.plugin.settings.colWidth),
indexWidth: 60,
minWidth: 60,

View file

@ -375,11 +375,11 @@ const createSheetEl = (
width: () => width - 10,
},
row: {
len: 100,
len: parseInt(plugin.settings.defaultRowsLen),
height: parseInt(plugin.settings.rowHeight),
},
col: {
len: 26,
len: parseInt(plugin.settings.defaultColsLen),
width: parseInt(plugin.settings.colWidth),
indexWidth: 60,
minWidth: 60,

View file

@ -42,6 +42,10 @@ export default {
ROW_HEIGHT_DESC: "Default row height",
COLUMN_WIDTH: "Column Width",
COLUMN_WIDTH_DESC: "Default column width",
DEFAULT_ROWS_LEN: 'Default render rows',
DEFAULT_ROWS_LEN_DESC: 'Default number of render rows',
DEFAULT_COLS_LEN: 'Default render columns',
DEFAULT_COLS_LEN_DESC: 'Default number of rendered columns',
SHOW_SHEET_BUTTON: "Show Sheet Button",
SHOW_SHEET_BUTTON_DESC: "Show Sheet Button",
};

View file

@ -41,6 +41,10 @@ export default {
ROW_HEIGHT_DESC: "设置表格的默认行高",
COLUMN_WIDTH: "列宽",
COLUMN_WIDTH_DESC: "设置表格的默认列宽",
DEFAULT_ROWS_LEN: '默认渲染行数',
DEFAULT_ROWS_LEN_DESC: '创建表格时默认渲染最大行数',
DEFAULT_COLS_LEN: '默认渲染列数',
DEFAULT_COLS_LEN_DESC: '创建表格时默认渲染最大列数',
SHOW_SHEET_BUTTON: "显示标题按钮",
SHOW_SHEET_BUTTON_DESC: "是否显示标题按钮",
};

View file

@ -7,6 +7,8 @@ export interface ExcelSettings {
colWidth: string,
theme: string,
showSheetButton: string,
defaultRowsLen: string,
defaultColsLen: string,
}
export const DEFAULT_SETTINGS: ExcelSettings = {
@ -18,4 +20,6 @@ export const DEFAULT_SETTINGS: ExcelSettings = {
colWidth: "100",
theme: "light",
showSheetButton: "true",
defaultRowsLen: "100",
defaultColsLen: "26",
};

View file

@ -46,6 +46,8 @@
bottom: 0;
z-index: 100;
opacity: 0;
width: 0;
height: 0;
}
/* Markdown 文档引入样式设置*/