mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-20 08:30:06 +00:00
Code for #819
This commit is contained in:
@@ -151,10 +151,14 @@ class CsvProcessor implements FileProcessorInterface
|
||||
*/
|
||||
private function getImportArray(): Iterator
|
||||
{
|
||||
$content = $this->job->uploadFileContents();
|
||||
$config = $this->job->configuration;
|
||||
$reader = Reader::createFromString($content);
|
||||
$reader->setDelimiter($config['delimiter']);
|
||||
$content = $this->job->uploadFileContents();
|
||||
$config = $this->job->configuration;
|
||||
$reader = Reader::createFromString($content);
|
||||
$delimiter = $config['delimiter'];
|
||||
if ($delimiter === 'tab') {
|
||||
$delimiter = "\t";
|
||||
}
|
||||
$reader->setDelimiter($delimiter);
|
||||
$start = $config['has-headers'] ? 1 : 0;
|
||||
$results = $reader->setOffset($start)->fetch();
|
||||
Log::debug(sprintf('Created a CSV reader starting at offset %d', $start));
|
||||
|
||||
Reference in New Issue
Block a user