The 📁 Procesar Excel tab is the core of the application. You upload a spreadsheet, the app assigns each street to its zone, and you download the enriched file.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Miguelcds/App_AsignadorZonasBilbao/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
Your Excel file must contain a column named exactlyCalle. The app reads the first sheet of the workbook using SheetJS and maps every row through asignarZona(). All other columns in your file are preserved in the output unchanged.
Accepted file formats:
.xlsx and .xls. Any other extension is silently rejected by the drop zone.Processing flow
Drop or select your file
Drag your
.xlsx / .xls file onto the drop zone, or click anywhere inside it to open the file picker. The Procesar Archivo button becomes active as soon as a valid file is loaded.The drop zone accepts the file via dragover / drop events and passes it through to the hidden <input id="fileInput"> so that the same processing path is always used:Click Procesar Archivo
Click Procesar Archivo to start processing. The button label changes to Procesando… and is disabled while the file is being read.Internally, SheetJS reads the file as an Each row object is then extended with a
ArrayBuffer and converts the first sheet to a JSON array:Zona field:Review the results
After processing, four sections appear below the upload card:
- Statistics bar — total streets, identified, not found, and coverage percentage.
- Distribución por Zonas — a chip list showing how many streets fell into each zone, sorted from highest to lowest count.
- Calles No Identificadas — clickable tags for every street that returned no zone match.
- Vista Previa — a paginated, filterable table of all rows.
Zone lookup logic
TheasignarZona() function is the heart of the matching engine. It uppercases the input street name, then iterates over every entry in the merged dictionary (base + custom) checking for a substring match:
getDictionary(), which merges the base entries from data.js with any custom entries stored in localStorage:
Statistics bar
After processing, the statistics bar (#statsBar) shows four counters:
| Field | Description |
|---|---|
| Total calles | Total number of rows read from the file |
| Identificadas | Rows where asignarZona() returned a non-empty zone |
| No encontradas | Rows with no zone match (total − found) |
| Cobertura | Percentage of rows that were matched (found / total × 100) |
Zone breakdown
The Distribución por Zonas card groups matched rows by zone and lists them sorted from most to fewest entries. Each chip shows the zone name and its row count.Unmatched streets
Every street that returned no zone is listed as a clickable tag in the Calles No Identificadas card. Clicking a tag navigates you directly to the ➕ Nueva Calle tab and pre-fills the street name innewStreetInput, so you can add it to the dictionary without retyping.
You can also export all unmatched streets to a plain-text file:
- Click Exportar .txt to download
calles_no_identificadas.txt, one street per line.
Preview table
The Vista Previa card shows a paginated table of all processed rows. The table has four columns: row number, Calle, Zona, and Estado (a green ✓ Encontrada badge or a red ✗ No identificada badge).Filtering and search
Use the controls in the preview header to narrow down the results:- Filtrar… text input — filters rows where either
CalleorZonacontains the typed string (case-insensitive). - Dropdown — switch between Todas, Identificadas, and No encontradas.
Pagination
Rows are shown50 at a time (PAGE_SIZE = 50). Page buttons appear below the table when there is more than one page. Click any page number to jump directly to it.