I'm using the LaravelExcel library to import data from an excel into a database.
To get the header data from my worksheet, do the following:
Excel::load('file.xls', function($reader) {
$nomeDasColunas = $reader->get()->first()->keys();
});
But I have the following problem: When my header comes with accented names, hyphens and other characters, they are being converted.
For example. The values:
Nome | E-mail | Número do Cartão
Being converted to
nome | email | numero_do_cartao
The problem is that I need the original names. I do not want to create a function to "reconvert" the values to the original names, as this would be a shot in the foot.
I tried this solution in everything that is place and I did not find it. I even looked at the source code of the library itself, but I have not found any method that I can define how the headers are read.
Is there any configuration of this library where I can change this name conversion?