Overview
Kontrak Backend accepts Excel files (.xlsx) containing employee data for bulk processing. The system validates headers, data types, and required fields before processing.Excel File Requirements
File Format
- Format:
.xlsx(Excel 2007+) - Max size: 10MB (configurable)
- Single or multiple sheets
- UTF-8 encoding supported
Data Structure
- Headers in row 1
- Data starts from row 2
- No merged cells in data area
- Consistent data types per column
Required Column Headers
For Regular Contracts (PLANILLA, PART TIME)
The system recognizes multiple aliases for each field. Use any of the following:Basic Information
Basic Information
| Field | Accepted Headers | Format | Example |
|---|---|---|---|
| Name | nombre, name, NOMBRE COMPLETO | Text | Juan |
| Father’s Last Name | apellido paterno, APELLIDO PATERNO | Text | Pérez |
| Mother’s Last Name | apellido materno, APELLIDO MATERNO | Text | García |
| DNI | dni, DNI, Documento de identidad | 8 digits | 12345678 |
email, Email, correo | [email protected] | ||
| Birth Date | Fecha Nac., fecha de nacimiento | DD/MM/YYYY | 15/03/1990 |
| Sex | GENERO, genero, sexo | M/F | M |
Address Information
Address Information
| Field | Accepted Headers | Format | Example |
|---|---|---|---|
| Address | dirección, direccion, DOMICILIO | Text | Av. Principal 123 |
| Province | provincia, PROVINCIA | Text | Lima |
| District | distrito, DISTRITO | Text | Miraflores |
| Department | departamento, DEPARTAMENTO | Text | Lima |
Employment Information
Employment Information
| Field | Accepted Headers | Format | Example |
|---|---|---|---|
| Position | Cargo, CARGO, POSICION | Text | Analista |
| Salary | salario, sueldo, SUELDO | Number | 3000 |
| Salary in Words | salario en letras, sueldo en letras | Text | tres mil soles |
| Entry Date | INICIO, fecha de ingreso | DD/MM/YYYY | 01/01/2024 |
| End Date | FIN, FECHA DE TERMINO, Fecha Fin | DD/MM/YYYY | 31/12/2024 |
| Subdivision | playa, PLAYA, ESTACIONAMIENTO | Text | Sede Central |
| Contract Type | tipo de contrato, TIPO DE CONTRATO | Text | Planilla |
For SUBSIDIO Contracts
| Field | Accepted Headers | Format | Example |
|---|---|---|---|
| Replacement For | Suplencia de:, SUPLENCIA DE, Reemplazo: | Text | Carlos Mendoza |
| Reason for Substitution | Motivo de Suplencia, MOTIVO DE SUPLENCIA | Text | Vacaciones |
| Time For Company | tiempo en empresa, Tiempo en Empresa | Text | 6 meses |
| Working Condition | CONDICION LABORAL, condición laboral | Text | Temporal |
| Probationary Period | PERIODO DE PRUEBA, Periodo de prueba | Text | 3 meses |
Upload Process
Data Type Handling
The Excel parser automatically handles various data formats:Date Fields
- Excel Date Format
- Text Date Format
Excel native date cells are automatically converted:Supported Date Fields:
entryDateendDatebirthDate
Numeric Fields
- DNI
- Salary
DNI can be entered as number or text, but must be 8 digits:✅ Valid:
❌ Invalid:
12345678, 87654321❌ Invalid:
1234567, 123456789, 12-345-678Text Fields
Text fields are automatically trimmed and validated:Header Validation
The system performs strict header validation before processing data.Validation Process
Validation Errors
Missing Headers Error
If required headers are missing:Data Validation Errors
If data doesn’t meet validation rules:Advanced Options
The Excel parser supports additional configuration:Processing Specific Sheets
Example Excel Template
PLANILLA Template
| nombre | apellido paterno | apellido materno | dni | Fecha Nac. | genero | dirección | provincia | distrito | departamento | sueldo | sueldo en letras | Cargo | INICIO | FIN | playa | tipo de contrato | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Juan | Pérez | García | 12345678 | [email protected] | 15/03/1990 | M | Av. Principal 123 | Lima | Miraflores | Lima | 3000 | tres mil soles | Analista | 01/01/2024 | 31/12/2024 | Sede Central | Planilla |
SUBSIDIO Template
| nombre | apellido paterno | apellido materno | dni | Fecha Nac. | genero | dirección | provincia | distrito | departamento | sueldo | sueldo en letras | Cargo | INICIO | FIN | playa | tipo de contrato | Suplencia de: | Motivo de Suplencia | tiempo en empresa | CONDICION LABORAL | PERIODO DE PRUEBA | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| María | López | Ruiz | 87654321 | [email protected] | 20/07/1988 | F | Jr. Los Olivos 456 | Lima | San Isidro | Lima | 2500 | dos mil quinientos soles | Asistente | 15/02/2024 | 31/08/2024 | Oficina Principal | Subsidio | Carlos Mendoza | Vacaciones | 6 meses | Temporal | 3 meses |
Download the Excel templates from the examples above to ensure proper formatting.
Common Issues
File too large
File too large
Error:
El archivo es demasiado grande. Tamaño máximo: 10 MBSolution:- Reduce file size by removing unnecessary formatting
- Split data into multiple files
- Increase
MAX_FILE_SIZEin configuration
Corrupt file error
Corrupt file error
Error:
El archivo Excel está corrupto o no es un archivo válidoSolution:- Save file as
.xlsxformat (not.xls) - Remove macros and VBA code
- Open and re-save in Excel
Empty file error
Empty file error
Error:
El archivo Excel no contiene datos válidosSolution:- Ensure data starts from row 2 (after headers)
- Check for hidden rows/columns
- Verify sheet is not empty
Header not found
Header not found
Error:
Encabezado requerido no encontrado en el archivoSolution:- Check spelling of column headers
- Use one of the accepted aliases
- Remove extra spaces in headers
- Ensure headers are in row 1
Best Practices
File Preparation
- Use the latest Excel format (.xlsx)
- Keep formatting simple
- Avoid merged cells
- Use consistent date formats
- Remove empty rows between data
Data Entry
- Use standard date format (DD/MM/YYYY)
- Enter DNI without dashes or spaces
- Use numeric format for salary
- Verify email addresses
- Double-check contract types
Validation
- Test with small file first
- Review validation errors carefully
- Fix errors row by row
- Keep backup of original file
Performance
- Keep files under 5MB when possible
- Limit to 1000 employees per file
- Remove unnecessary columns
- Use single sheet when possible
Next Steps
Generating Contracts
Generate contracts from uploaded data
Error Handling
Learn how to handle validation errors