change template and import o use also sheet number of XLS
This commit is contained in:
@@ -167,7 +167,12 @@ error_log("Loaded template: " . print_r($template, true));
|
||||
<div class="d-flex align-items-center">
|
||||
<div>
|
||||
<h6 class="mb-0"><?= htmlspecialchars($template['name']) ?></h6>
|
||||
<small>Template ID: <?= $id ?>, Start Row: <?= $template['header_row'] ?>, Start Column: <?= $template['start_column'] ?></small>
|
||||
<small>
|
||||
Template ID: <?= $id ?>,
|
||||
Sheet Number: <?= (int)($template['xls_sheet_index'] ?? 0) ?>,
|
||||
Start Row: <?= $template['header_row'] ?>,
|
||||
Start Column: <?= $template['start_column'] ?>
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -244,8 +249,9 @@ error_log("Loaded template: " . print_r($template, true));
|
||||
const templateId = <?= $id ?>;
|
||||
console.log('Template ID passed to formData:', templateId);
|
||||
formData.append('template_id', templateId);
|
||||
formData.append('header_row', <?= $template['header_row'] ?>);
|
||||
formData.append('start_column', <?= $template['start_column'] ?>);
|
||||
formData.append('header_row', <?= (int)$template['header_row'] ?>);
|
||||
formData.append('start_column', <?= json_encode($template['start_column']) ?>);
|
||||
formData.append('xls_sheet_index', <?= (int)($template['xls_sheet_index'] ?? 0) ?>);
|
||||
|
||||
fetch('process_import_xls2.php', {
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user