Compare commits
2 Commits
c8d18cf248
...
53ecce1eca
| Author | SHA1 | Date | |
|---|---|---|---|
|
53ecce1eca
|
|||
|
3430b1c2b1
|
@@ -179,9 +179,15 @@ function parseLessonCell(cell) {
|
|||||||
|
|
||||||
if (!text || cleanupRegex.test(text) || !cell.fill?.fgColor) return null;
|
if (!text || cleanupRegex.test(text) || !cell.fill?.fgColor) return null;
|
||||||
|
|
||||||
|
const backgroundColor = cell.fill.fgColor.argb === undefined ? undefined : `#${cell.fill.fgColor.argb}`;
|
||||||
|
const foregroundColor = backgroundColor === undefined ? undefined : (
|
||||||
|
cell.font?.color?.argb === undefined ? undefined : `#${cell.font.color.argb}`
|
||||||
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
text,
|
text,
|
||||||
backgroundColor: cell.fill.fgColor.argb === undefined ? undefined : `#${cell.fill.fgColor.argb}`,
|
backgroundColor,
|
||||||
|
foregroundColor,
|
||||||
willBeSpecified: cell.fill.fgColor.argb === "FFFFFF00" ? true : undefined,
|
willBeSpecified: cell.fill.fgColor.argb === "FFFFFF00" ? true : undefined,
|
||||||
};
|
};
|
||||||
} catch {
|
} catch {
|
||||||
@@ -298,4 +304,4 @@ function formatNowTime() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// parseV3("db/current.xlsx")
|
parseV3("db/current.xlsx")
|
||||||
|
|||||||
Reference in New Issue
Block a user