rapid-spreadjs 1.0.25 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,21 @@ export declare const WorkbookUtils: {
10
10
  * @param errorFunc 文件打开失败后的回调函数,返回的第一个参数为错误信息
11
11
  */
12
12
  loadSjsFile: (spread: any, fileUrl: string, succFunc?: (spreadObj: any) => Promise<void>, errorFunc?: (error: any) => Promise<void>) => Promise<void>;
13
+ /**
14
+ * 获取工作簿的Blob对象
15
+ * @param spread 工作簿实例
16
+ * @returns 返回异步的Promise对象(Blob对象)
17
+ * @example
18
+ * const saveSpread = async (spread: any) => {
19
+ * try {
20
+ * const blob = await WorkbookUtils.getWookbookBlob(spread);
21
+ * console.log('获取成功:', blob);
22
+ * } catch (error) {
23
+ * console.error('获取失败:', error);
24
+ * }
25
+ * };
26
+ */
27
+ getWookbookBlob: (spread: any) => Promise<Blob>;
13
28
  /**
14
29
  * 打印所有工作表
15
30
  * @param GC GC对象
@@ -24,4 +39,12 @@ export declare const WorkbookUtils: {
24
39
  * @param fileName 导出的文件名称,不传则为第一个工作表的名称
25
40
  */
26
41
  exportToExcel: (GC: any, spread: any, fileName?: string) => void;
42
+ /**
43
+ * 合并多个工作簿并导出Excel(同时返回合并后的工作簿实例)
44
+ * @param GC Spread的GC对象
45
+ * @param spreads 工作簿实例集合
46
+ * @param exportName 导出的文件名称,不传则为第一个Sheet的名称
47
+ * @returns 合并后的工作簿实例
48
+ */
49
+ mergeWorkbooksToExcel: (GC: any, spreads: any[], exportName?: string) => Promise<any>;
27
50
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rapid-spreadjs",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "SpreadJS常用公用处理函数,包括设计器、工作簿和工作表的相关处理函数。",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",