@TARR מי אמר לך שהקובץ תקין ?
אולי לא הגדרת נכון ?
יש לי קובץ HTML ליצירת קובץ
מצורף קוד בספויילר
Spoiler
<!DOCTYPE html>
<html lang="he" dir="rtl">
<head>
<meta charset="UTF-8">
<title>מחולל קובץ ListAllInformation.ini</title>
<style>
body { font-family: sans-serif; margin: 20px; line-height: 1.6; }
table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
th, td { border: 1px solid #ccc; padding: 8px; text-align: center; }
th { background-color: #f4f4f4; }
input { width: 90%; padding: 5px; border: 1px solid #ddd; }
.btn { padding: 10px 20px; cursor: pointer; background-color: #007bff; color: white; border: none; border-radius: 4px; }
.btn-add { background-color: #28a745; }
.instructions { background: #f9f9f9; padding: 15px; border-right: 5px solid #007bff; margin-bottom: 20px; }
</style>
</head>
<body>
<h2>יצירת קובץ ListAllInformation.ini</h2>
<div class="instructions">
<strong>הגדרות שלוחה (יש להדביק ב-ext.ini):</strong><br>
<code>enter_id=yes</code><br>
<code>enter_id_type=list_all_information</code><br>
<code>list_all_information_folder=this_folder</code>
</div>
<table id="userTable">
<thead>
<tr>
<th>A: זהות/מספר</th>
<th>B: מורשה (1=כן)</th>
<th>C: שם פרטי</th>
<th>D: משפחה</th>
<th>E: אימייל</th>
<th>F: מוסד</th>
<th>G: סיסמה</th>
<th>H: סכום</th>
<th>I: חופשי</th>
<th>J: עיר</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="text" placeholder="מספר אישי"></td>
<td><input type="text" value="1"></td>
<td><input type="text" placeholder="שם"></td>
<td><input type="text" placeholder="משפחה"></td>
<td><input type="text"></td>
<td><input type="text"></td>
<td><input type="text"></td>
<td><input type="text"></td>
<td><input type="text"></td>
<td><input type="text"></td>
</tr>
</tbody>
</table>
<button class="btn btn-add" onclick="addRow()">הוסף שורה חדשה</button>
<button class="btn" onclick="generateFile()">צור והורד קובץ .ini</button>
<script>
function addRow() {
const table = document.getElementById("userTable").getElementsByTagName('tbody')[0];
const newRow = table.insertRow();
for (let i = 0; i < 10; i++) {
const cell = newRow.insertCell(i);
const input = document.createElement("input");
input.type = "text";
if (i === 1) input.value = "1"; // ברירת מחדל למורשה כניסה
cell.appendChild(input);
}
}
function generateFile() {
const rows = document.querySelectorAll("#userTable tbody tr");
let csvContent = "";
rows.forEach(row => {
const inputs = row.querySelectorAll("input");
let rowData = Array.from(inputs).map(input => {
// הסרת פסיקים מהנתונים למניעת שיבוש בפורמט CSV
return input.value.replace(/,/g, "");
});
csvContent += rowData.join(",") + "\n";
});
// יצירת קובץ עם קידוד UTF-8 כולל BOM (כדי שיזוהה נכון ע"י מערכות שונות)
const bom = new Uint8Array([0xEF, 0xBB, 0xBF]);
const blob = new Blob([bom, csvContent], { type: "text/plain;charset=utf-8" });
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = "ListAllInformation.ini";
link.click();
URL.revokeObjectURL(link.href);
}
</script>
</body>
</html>