KGA Data Conversionដំណើរការជាបាច់
Import Attributes from Excel
អនុវត្ត workbook នៃគុណលក្ខណៈដែលបានកែ ត្រឡប់ទៅស្រទាប់ដើម ដោយផ្គូផ្គងជួរតាមជួរឈរ key។
- រកឃើញនៅឯណា
- Processing ▸ Toolbox ▸ KGA Toolbox ▸ KGA Data Conversion ▸ Import Attributes from Excel
- លេខសម្គាល់ algorithm
- kga:xlsx_to_attributes
- ប្រភេទឧបករណ៍
- Batch algorithm (runs on the GUI thread — it writes into a project layer)
ទិដ្ឋភាពទូទៅ
Reports first, writes second. The report gives a per-field count and a table of changed values, old next to new, so the change can be reviewed before anything is committed — and it runs as a dry run by default.
The workbook and the layer are already filled in from your last export, so the normal round trip — export, edit in Excel, save, come back — needs no browsing. Both survive a QGIS restart, and clear themselves if the file is moved or deleted.
ប៉ារ៉ាម៉ែត្រ
| ឈ្មោះ | ប្រភេទ | តម្លៃលំនាំដើម | ការពិពណ៌នា |
|---|---|---|---|
| Workbook | File (.xlsx) | the last exported workbook | The edited sheet. |
| Target layer | Vector layer | the layer that export came from | The layer written to. |
| Key field (taken from the workbook if left empty) | Field of Target layer, optional | empty | Normally leave it: the workbook records which column is the key. |
| Fields to apply (all the workbook holds if left empty) | Field of Target layer, multiple, optional | empty (all) | Narrow it to apply only some columns. |
| Rows whose key is not in the layer | Enum | Report them | Ignore them, Report them, Fail if there are any. |
| Read bare numbers in date fields as Excel day serials | Boolean | True | Decodes Excel's 45231 back into a date. |
| Dry run (report only, write nothing) | Boolean | True | On by default. Turn it off deliberately. |
| Change report | File destination (HTML), optional | not created | The report as a file. In a dry run, the report is the deliverable. |
របៀបប្រើ
- Save and close the workbook in Excel.
- Make sure the target layer has no unsaved edits — commit or roll back first.
- Open KGA Data Conversion > Import Attributes from Excel. The workbook and layer are already filled in.
- Leave the dry run on and press Run.
- Read the report: per-field counts, and every changed value old next to new. This is where you catch a colleague who sorted the sheet, retyped a code, or pasted a column one row out.
- Untick Dry run and run again to commit.
លទ្ធផល
លទ្ធផលដែលប្រកាស
| ឈ្មោះ | ប្រភេទ | ការពិពណ៌នា |
|---|---|---|
| Values changed | Number |
អ្វីដែលអ្នកទទួលបាន
- The changed values written onto the target layer — only when the dry run is off.
- A change report with a per-field count and a table of old-versus-new values, in the Processing log and as HTML when asked for.
- The Values changed count.
កំណត់សម្គាល់ និងដែនកំណត់
- The dry run is on by default, and the report is the point. Do not untick it before reading one.
- The target must have no unsaved edits. The run is refused otherwise.
- Excel's habits are handled, not absorbed. A text code turned into a number comes back as text; a date turned into the serial
45231is decoded when Excel date serials is on; a value that will not fit the field is reported rather than landing as a NULL. - A workbook recording a different layer gives a warning, not a refusal — applying a sheet to a copy is legitimate. But read the report before turning off the dry run.
- Rows whose key is not in the layer are reported by default; set the enum to Fail if there are any when the sheet is supposed to match exactly.
- The outbound half is Export Attributes to Excel; the two are pinned together in the Data Conversion menu.