This commit is contained in:
@@ -318,7 +318,7 @@ function extractTakesPlace(sheet: Worksheet) {
|
||||
const cellTry = sheet.getCell(`${cellTest}${i}`)
|
||||
const cellValue = (typeof cellTry?.value === 'string' ? cellTry.value.trim() : "") || "";
|
||||
|
||||
if (cellValue.length >= threshold) {
|
||||
if (cellValue.length >= threshold || cellTry.isMerged) {
|
||||
str += `\n${cellValue}`;
|
||||
con = true;
|
||||
break;
|
||||
@@ -353,12 +353,16 @@ function extractReservedRooms(sheet: Worksheet) {
|
||||
cells.forEach((address) => {
|
||||
const row = sheet.getRow(Number(sheet.getCell(address).row));
|
||||
|
||||
row.eachCell((cell) => {
|
||||
if (cell.address === address) return;
|
||||
function numToChar(n: number) {
|
||||
return String.fromCharCode(n + 66);
|
||||
}
|
||||
|
||||
for (let i = 0; i < 10; i++) {
|
||||
const cell = row.getCell(numToChar(i));
|
||||
|
||||
const val = cell.value?.toString().trim();
|
||||
result.push(!val || val.length == 0 ? null : val)
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
while (result.length < 10) {
|
||||
@@ -424,4 +428,4 @@ function formatNowTime() {
|
||||
);
|
||||
}
|
||||
|
||||
//parseV3("db/current.xlsx")
|
||||
//parseV3("volume/db/current.xlsx")
|
||||
|
||||
Reference in New Issue
Block a user