This commit is contained in:
@@ -202,18 +202,10 @@ function extractTakesPlace(sheet) {
|
|||||||
if (!cell.isMerged) {
|
if (!cell.isMerged) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
let str = cell.master?.value?.trim() || "";
|
let str = "";
|
||||||
|
|
||||||
let i = 5;
|
let i = 4;
|
||||||
while (true) {
|
while (true) {
|
||||||
const nextCell = sheet.getCell(`B${i}`);
|
|
||||||
|
|
||||||
if (nextCell.isMerged) {
|
|
||||||
str += `\n${cell.master?.value?.trim() || ""}`
|
|
||||||
i++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const tryCells = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K"];
|
const tryCells = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K"];
|
||||||
const threshold = 20;
|
const threshold = 20;
|
||||||
let con = false;
|
let con = false;
|
||||||
@@ -224,13 +216,13 @@ function extractTakesPlace(sheet) {
|
|||||||
|
|
||||||
if (cellValue.length >= threshold) {
|
if (cellValue.length >= threshold) {
|
||||||
str += `\n${cellValue}`;
|
str += `\n${cellValue}`;
|
||||||
i++;
|
|
||||||
con = true;
|
con = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (con) {
|
if (con || i == 4) {
|
||||||
|
i++;
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
@@ -260,10 +252,14 @@ function extractReservedRooms(sheet) {
|
|||||||
row.eachCell((cell) => {
|
row.eachCell((cell) => {
|
||||||
if (cell.address === address) return;
|
if (cell.address === address) return;
|
||||||
|
|
||||||
result.push(cell.value.trim().length == 0 ? null : cell.value)
|
result.push(cell.value?.trim().length == 0 ? null : cell.value)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
while (result.length < 10) {
|
||||||
|
result.push(null);
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,4 +318,4 @@ function formatNowTime() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//parseV3("db/current.xlsx")
|
parseV3("db/current.xlsx")
|
||||||
|
|||||||
Reference in New Issue
Block a user