1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
| const workbook = { SheetNames: [ //工作表名数组 'Sheet1', 'Sheet2', 'Sheet2', ], Sheets: { //工作表对象 Sheet1: { //工作表1 '!ref': 'A1:C2', //工作表的范围 如 必须 否则不显示 '!merges': [ //工作表单元格合并配置项 可选 { s: { //s start 开始 c: 1,//cols 开始列 r: 0 //rows 开始行 }, e: {//e end 结束 c: 4,//cols 结束列 r: 0 //rows 结束行 } } ], '!cols': [ //工作表列宽配置项 可选 { /* visibility */ hidden? : boolean, // if true, the column is hidden /* column width is specified in one of the following ways: */ wpx? : number, // width in screen pixels width? : number, // width in Excel's "Max Digit Width", width*256 is integral wch? : number, // width in characters /* other fields for preserving features from files */ MDW? : number, // Excel's "Max Digit Width" unit, always integral } ], '!rows': [ //工作表列高配置项 可选 { /* visibility */ hidden? : boolean, // if true, the row is hidden /* row height is specified in one of the following ways: */ hpx? : number, // height in screen pixels hpt? : number, // height in points level? : number, // 0-indexed outline / group level } ], }, Sheet2: {}, //工作表2 Sheet3: {} //工作表3 } }
|