rapid-spreadjs 1.0.33 → 1.0.35
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.
- package/dist/index.cjs.js +54 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +54 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/utils/wookbook.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -614,7 +614,7 @@ const BusinessUtils = {
|
|
|
614
614
|
sheet.setRowHeight(totalRowCount, addRowHeight, gc.Spread.Sheets.SheetArea.viewport);
|
|
615
615
|
// 获取添加这一行的区域范围
|
|
616
616
|
const addRowRange = sheet.getRange(totalRowCount, 1, contentColStartIndex, contentTotalColCount, gc.Spread.Sheets.SheetArea.viewport);
|
|
617
|
-
//
|
|
617
|
+
// 设置添加这一行区域中的边框样式(上下左右边框样式为粗线、中间的为细边框样式)
|
|
618
618
|
addRowRange.setBorder(new gc.Spread.Sheets.LineBorder('#000', gc.Spread.Sheets.LineStyle.thin), { all: true });
|
|
619
619
|
addRowRange.setBorder(new gc.Spread.Sheets.LineBorder('#000', gc.Spread.Sheets.LineStyle.medium), {
|
|
620
620
|
left: true,
|
|
@@ -18531,6 +18531,56 @@ const FormulaUtils = {
|
|
|
18531
18531
|
return tdz;
|
|
18532
18532
|
},
|
|
18533
18533
|
},
|
|
18534
|
+
{
|
|
18535
|
+
funName: 'YJSXS',
|
|
18536
|
+
funDesc: '水温查表',
|
|
18537
|
+
funDefaultVal: null,
|
|
18538
|
+
// isContainNullUndefinedVal: true,
|
|
18539
|
+
funParams: [
|
|
18540
|
+
{
|
|
18541
|
+
name: '温度',
|
|
18542
|
+
repeatable: false,
|
|
18543
|
+
optional: false,
|
|
18544
|
+
},
|
|
18545
|
+
],
|
|
18546
|
+
funCallback: (spread, sheet, retData) => {
|
|
18547
|
+
//如果传递的参数小于1个,则返回空字符串
|
|
18548
|
+
if (retData.allCellVals.length < 1) {
|
|
18549
|
+
return '';
|
|
18550
|
+
}
|
|
18551
|
+
let a = retData.allCellVals[0] + '';
|
|
18552
|
+
var sw; //最后输出的值
|
|
18553
|
+
var arr = new Array('15-0.002', '16-0.003', '17-0.003', '18-0.004', '19-0.004', '20-0.005', '21-0.005', '22-0.006', '23-0.006', '24-0.007', '25-0.008');
|
|
18554
|
+
for (var i = 0; i < arr.length; i++) {
|
|
18555
|
+
var ret = arr[i].split('-');
|
|
18556
|
+
if (a == ret[0]) {
|
|
18557
|
+
sw = ret[1];
|
|
18558
|
+
}
|
|
18559
|
+
}
|
|
18560
|
+
if (a.length > 2) {
|
|
18561
|
+
var sw = a;
|
|
18562
|
+
sw = sw.substring(0, sw.indexOf('.'));
|
|
18563
|
+
var j = 0;
|
|
18564
|
+
for (var i = 0; i < arr.length; i++) {
|
|
18565
|
+
var ret = arr[i].split('-');
|
|
18566
|
+
if (sw == ret[0]) {
|
|
18567
|
+
j = i;
|
|
18568
|
+
}
|
|
18569
|
+
}
|
|
18570
|
+
if (j == arr.length - 1) {
|
|
18571
|
+
var arr1 = arr[j].split('-');
|
|
18572
|
+
var arr2 = arr[j - 1].split('-');
|
|
18573
|
+
sw = FormulaUtils.commFun.GetDataOddIncreaseEvenDecrease(FormulaUtils.commFun.InterpolationMethod_y(arr1[0], arr2[0], arr1[1], arr2[1], a), -3);
|
|
18574
|
+
}
|
|
18575
|
+
else {
|
|
18576
|
+
var arr1 = arr[j].split('-');
|
|
18577
|
+
var arr2 = arr[j + 1].split('-');
|
|
18578
|
+
sw = FormulaUtils.commFun.GetDataOddIncreaseEvenDecrease(FormulaUtils.commFun.InterpolationMethod_y(arr1[0], arr2[0], arr1[1], arr2[1], a), -3);
|
|
18579
|
+
}
|
|
18580
|
+
}
|
|
18581
|
+
return sw;
|
|
18582
|
+
},
|
|
18583
|
+
},
|
|
18534
18584
|
],
|
|
18535
18585
|
};
|
|
18536
18586
|
|
|
@@ -18726,12 +18776,13 @@ const WorkbookUtils = {
|
|
|
18726
18776
|
* @param isExcel 是否导出为Excel文件,默认为true(如果为false,则导出为PDF)
|
|
18727
18777
|
* @param exportName 导出的文件名称,不传则为第一个Sheet的名称
|
|
18728
18778
|
* @param regFonts 注册的字体集合,默认注册宋体和Arial字体
|
|
18779
|
+
* @param contentColEndIndex 内容列结束的索引,默认为:77(用于导出PDF文件的时候,只导出内容列到索引contentColEndIndex的位置,超过contentColEndIndex索引列后续的内容其实不需要导出)
|
|
18729
18780
|
* @returns 合并后的工作簿实例
|
|
18730
18781
|
*/
|
|
18731
18782
|
mergeWorkbooksToExcelOrPdf: (GC_1, spreads_1, ...args_1) => __awaiter(void 0, [GC_1, spreads_1, ...args_1], void 0, function* (GC, spreads, isExcel = true, exportName, regFonts = [
|
|
18732
18783
|
{ name: '宋体', type: 'normal', url: '/spreadJsFonts/simsun.ttf' },
|
|
18733
18784
|
{ name: 'Arial', type: 'normal', url: '/spreadJsFonts/arial.ttf' },
|
|
18734
|
-
]) {
|
|
18785
|
+
], contentColEndIndex = 77) {
|
|
18735
18786
|
if (!spreads || spreads.length == 0) {
|
|
18736
18787
|
return;
|
|
18737
18788
|
}
|
|
@@ -18814,6 +18865,7 @@ const WorkbookUtils = {
|
|
|
18814
18865
|
const pdfSheet = mainWorkbook.getSheet(mainWorkbook.getSheetCount() - 1);
|
|
18815
18866
|
let printInfo = pdfSheet.printInfo();
|
|
18816
18867
|
printInfo.margin({ top: 0, bottom: 0, left: 0, right: 0, header: 0, footer: 0 });
|
|
18868
|
+
printInfo.columnEnd(contentColEndIndex);
|
|
18817
18869
|
printInfo.showBorder(false);
|
|
18818
18870
|
printInfo.showGridLine(false);
|
|
18819
18871
|
printInfo.blackAndWhite(false);
|