1 parent
7805931355
commit
3798e1d1d8
5 files changed
+351
-97
No files matched your search
+13
-4
@@ -2,11 +2,20 @@ const wpsInstance = {
|
||||
app: wps.EtApplication().Application,
|
||||
|
||||
// 获取全部 sheet 页
|
||||
getSheets: () => {
|
||||
const activeWorkbook = wpsInstance.app.ActiveWorkbook;
|
||||
for (let i = 1; i <= activeWorkbook.Worksheets.Count; i++) {
|
||||
alert(activeWorkbook.Worksheets.Item(i).Name)
|
||||
getSheets: (args) => {
|
||||
const workbook_name = args.workbook_name;
|
||||
let workbook = null;
|
||||
if (workbook_name) {
|
||||
workbook = wpsInstance.app.Workbooks.Item(workbook_name);
|
||||
}
|
||||
else {
|
||||
workbook = wpsInstance.app.ActiveWorkbook;
|
||||
}
|
||||
const sheets = [];
|
||||
for (let i = 1; i <= workbook.Worksheets.Count; i++) {
|
||||
sheets.push(workbook.Worksheets.Item(i).Name);
|
||||
}
|
||||
return sheets;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user