Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
fix(function array value error): fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
DR-Univer committed Oct 19, 2020
1 parent 7a2f8d0 commit 31e4b3d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
6 changes: 4 additions & 2 deletions src/global/formula.js
Original file line number Diff line number Diff line change
Expand Up @@ -4067,7 +4067,7 @@ const luckysheetformula = {

i++;
}
// console.log(function_str);
console.log(function_str);
return function_str;
},
insertUpdateDynamicArray: function(dynamicArrayItem) {
Expand Down Expand Up @@ -5081,7 +5081,7 @@ const luckysheetformula = {

let ukey ="r" + u.r + "c" + u.c + "i" + u.index;

// if ((u.r == item.r && u.c == item.c && u.index == item.index) || name in _this.execvertex[ukey].chidren ) {
// if ((u.r == item.r && u.c == item.c && u.index == item.index) ) {
// continue;
// }

Expand Down Expand Up @@ -5430,6 +5430,8 @@ const luckysheetformula = {
return [true, result, txt, {type: "dynamicArrayItem", data: dynamicArrayItem}];
}

console.log(result, txt);

return [true, result, txt];
},
testFunction: function(txt, fp) {
Expand Down
20 changes: 16 additions & 4 deletions src/global/func_methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ const func_methods = {
if(getObjType(rangeObj.data) == "array"){
for(let i = 0; i < rangeObj.data.length; i++){
for(let j = 0; j < rangeObj.data[i].length; j++){
if(rangeObj.data[i][j] != null && !isRealNull(rangeObj.data[i][j].v)){
dataArr.push(rangeObj.data[i][j].v);
if(rangeObj.data[i][j] != null){
let datav = rangeObj.data[i][j];
if(datav instanceof Object){
dataArr.push(datav.v);
}
else{
dataArr.push(datav);
}
}
else{
if(!isNeglectNullCell){
Expand Down Expand Up @@ -92,8 +98,14 @@ const func_methods = {
for(let j = 0; j < rangeObj.data[i].length; j++){
let value;

if(rangeObj.data[i][j] != null && !isRealNull(rangeObj.data[i][j].v)){
value = rangeObj.data[i][j].v;
if(rangeObj.data[i][j] != null){
let datav = rangeObj.data[i][j];
if(datav instanceof Object){
value = datav.v;
}
else{
value = datav;
}
}
else{
if(nullCellType == "number"){
Expand Down
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}
],
data:
[sheetCell,sheetFormula,sheetConditionFormat,sheetSparkline,sheetTable,sheetComment,sheetPivotTableData,sheetPivotTable,sheetChart,sheetPicture,sheetDataVerification]
[sheetCell,sheetFormula,sheetConditionFormat,sheetTable,sheetComment,sheetPivotTableData,sheetPivotTable,sheetChart,sheetPicture,sheetDataVerification]
/*[{"name":"Sheet1","config":{"columnlen":{"0":241},"rowlen":{"0":81}},"index":"1","status":"1","order":"0","luckysheet_select_save":[{"row":[0,0],"column":[4,4],"sheetIndex":1}],"zoomRatio":1,"showGridLines":"1","defaultColWidth":72,"defaultRowHeight":18,"celldata":[
{"r":0,"c":0,
"v":{
Expand Down

0 comments on commit 31e4b3d

Please sign in to comment.