система инит

This commit is contained in:
Artyom Tsyrulnikov
2025-07-15 06:42:04 +03:00
parent 2100fcd249
commit 6bd5bba15a
22 changed files with 7273 additions and 257 deletions

View File

@@ -97,6 +97,18 @@ const DualSpreadsheet: FC<DualSpreadsheetProps> = ({ templateData = {} }) => {
})
)
}));
// Загружаем данные в движок
Object.entries(templateData.Report).forEach(([cellName, value]) => {
const match = cellName.match(/^([A-Z]+)(\d+)$/);
if (match) {
const col = match[1].charCodeAt(0) - 65;
const row = parseInt(match[2]) - 1;
if (row >= 0 && row < 20 && col >= 0 && col < 10) {
multiSheetEngine.setCellValue('Report', row, col, String(value));
}
}
});
}
}, [templateData]);