I encountered a problem with some spreadsheet files - the total number of columns wasn't calculated correctly. I don't know why, but transforming the file path to an absolute path in the loadWorksheet() method of the Spreadsheet source plugin seemed to fix the problem.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

adinac created an issue. See original summary.

adinac’s picture

adinac’s picture

Issue summary: View changes
claudiu.cristea’s picture

Status: Active » Reviewed & tested by the community

I have no clue why this happens, neither I'm sure that it could be a dependency between file path and column count. However, normalising the file path looks like a good thing to have. Let's do it.

+++ b/src/Plugin/migrate/source/Spreadsheet.php
@@ -4,10 +4,13 @@ namespace Drupal\migrate_spreadsheet\Plugin\migrate\source;
+use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
...
+use Drupal\Core\File\FileSystemInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;

The 'use' block should be alphabetically ordered.

  • claudiu.cristea committed fc2cc00 on 8.x-1.x authored by adinac
    Issue #2932332 by adinac, claudiu.cristea: Use an absolute filepath for...
claudiu.cristea’s picture

Status: Reviewed & tested by the community » Fixed

Fixe with some minor changes from #4.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.