This commit is contained in:
@@ -202,18 +202,10 @@ function extractTakesPlace(sheet) {
|
||||
if (!cell.isMerged) {
|
||||
return "";
|
||||
}
|
||||
let str = cell.master?.value?.trim() || "";
|
||||
let str = "";
|
||||
|
||||
let i = 5;
|
||||
let i = 4;
|
||||
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 threshold = 20;
|
||||
let con = false;
|
||||
@@ -224,13 +216,13 @@ function extractTakesPlace(sheet) {
|
||||
|
||||
if (cellValue.length >= threshold) {
|
||||
str += `\n${cellValue}`;
|
||||
i++;
|
||||
con = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (con) {
|
||||
if (con || i == 4) {
|
||||
i++;
|
||||
continue;
|
||||
} else {
|
||||
break;
|
||||
@@ -260,10 +252,14 @@ function extractReservedRooms(sheet) {
|
||||
row.eachCell((cell) => {
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -322,4 +318,4 @@ function formatNowTime() {
|
||||
);
|
||||
}
|
||||
|
||||
//parseV3("db/current.xlsx")
|
||||
parseV3("db/current.xlsx")
|
||||
|
||||
Reference in New Issue
Block a user