Kimi chinh sua

This commit is contained in:
2026-04-24 08:58:53 +00:00
parent 91ff4a5e4d
commit 86216ef872
43 changed files with 2868 additions and 597 deletions

24
analyze_contracts.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
require 'vendor/autoload.php';
use PhpOffice\PhpSpreadsheet\IOFactory;
function analyze($file) {
echo "--- ANALYZING: $file ---\n";
try {
$spreadsheet = IOFactory::load($file);
$worksheet = $spreadsheet->getActiveSheet();
$rows = $worksheet->toArray();
echo "HEADERS:\n";
if (isset($rows[0])) {
foreach ($rows[0] as $idx => $h) echo "Col $idx: " . ($h ?? "NULL") . "\n";
}
echo "SAMPLE DATA (Row 2):\n";
if (isset($rows[1])) echo implode(" | ", array_map(fn($v) => $v ?? "NULL", $rows[1])) . "\n";
} catch (Exception $e) {
echo "Error: " . $e->getMessage() . "\n";
}
echo "\n";
}
analyze('storage/app/imports/Hd_kh.xlsx');
analyze('storage/app/imports/hopdong.xlsx');