1
I am using the Laravelexcel library to import data from an excel to a database.
To get the header data from my spreadsheet, I 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 accentuated names, hyphens and other characters, they are being converted.
For example. The values:
Nome | E-mail | Número do Cartão
Is being converted to
nome | email | numero_do_cartao
The problem is I need the original names. I don’t want to create a function to "reconvert" the values to the original names, because that would be a shot in the foot.
I’ve looked everywhere for this solution, and I can’t find it. I even looked at the source code of the library itself, but I couldn’t find any method that I can define the way the headers are read.
Is there any configuration of this library where I can change this name conversion?