diff --git a/FeedsExcelParser.inc b/FeedsExcelParser.inc index 602bef3..ece15a7 100644 --- a/FeedsExcelParser.inc +++ b/FeedsExcelParser.inc @@ -117,11 +117,6 @@ class FeedsExcelParser extends FeedsParser{ } $column++; } - // A special case. We need to ensure that the GUID column has a value - // defined, even if that value is the empty string. - if(count($row_values) && $column < count($this->state->column_names) && !isset($row_values['GUID']) && array_search('GUID', $this->state->column_names)){ - $row_values['GUID'] = ''; - } if(!isset($this->state->column_names)){ // Loop through the headers we have been provided with, and convert them // to the exact case/capitalisation as the mappings that the importer @@ -143,6 +138,11 @@ class FeedsExcelParser extends FeedsParser{ $rows[] = $row_values; } } + // A special case. We need to ensure that the GUID column has a value + // defined, even if that value is the empty string. + if(count($row_values) && $column < count($this->state->column_names) && !isset($row_values['GUID']) && array_search('GUID', $this->state->column_names)){ + $row_values['GUID'] = ''; + } if(!$source_config['use_chunk_reader'] && $num_rows_pulled >= (isset($source_config['chunk_size']) ? $source_config['chunk_size'] : variable_get('feeds_process_limit', FEEDS_PROCESS_LIMIT))){ break; }