(3-13)~(3-21) xpath반환값이 여러개일경우 첫번째 태그의 결과를 사용하도록 구문 수정

This commit is contained in:
2025-03-05 18:35:31 +09:00
parent f82b317cac
commit 66223549b8
21 changed files with 1585 additions and 53 deletions

View File

@@ -85,8 +85,6 @@ studentDirs.forEach(student => {
scoringResult[index + 1] = getScore(psdData, scoringJson, index);
} catch (error) {
console.error(`Error reading PSD file: ${psdPath}`, error);
// 잘못된 파일을 건너뛰기
// scoringResult[index + 1] = null;
}
});
gmepFile.forEach((gmep, index) => {
@@ -103,8 +101,6 @@ studentDirs.forEach(student => {
scoringResultList.push(scoringResult);
});
// 엑셀 파일 생성
// Flatten the resultData for better representation in Excel
const flattenedData = scoringResultList.map(student => {
const name = student["0"]
@@ -120,6 +116,7 @@ const flattenedData = scoringResultList.map(student => {
});
// console.log(flattenedData);
// 엑셀 파일 생성
const worksheet = XLSX.utils.json_to_sheet(flattenedData);
const workbook = XLSX.utils.book_new();