Skip to main content
Question

How to dynamically read excel files with different worksheet name?

  • February 3, 2023
  • 3 replies
  • 114 views

arthy
Contributor
Forum|alt.badge.img+8
  • Contributor

I want to read sevaral excel file that are inside a zip file.

An excel file has the worksheest  Data 1, Dat2, ... Data n and the number of worksheet varies from one file to another.

For a given zipfile, I first read the schema feature  using a featureReader to get the list of sheetname.

imageThen, using a second featureReader, I read the attribute with the worksheet  

imageThe problem that I'm facing now is that when I enter manuall the values filename and filepath used within the first FeatureReader,  I'm able to get the reseults that I wanted. However, when I tried to read all the zip file with a python caller, the program stop and the only error that I have is ERROR RUNNING TRANSLATION.

Storing feature(s) to FME feature store file `C:\Users\...\inspector.ffs'
Storing feature(s) to FME feature store file `C:\Users\...\inspector.fsc'
Error running translation.
Creating reader for format: Microsoft Excel
Trying to find a DYNAMIC plugin for reader named `XLSXR'
FME API version of module 'XLSXR' matches current internal version (3.8 20160224)

And I'm not able to understand the error because, inside the ffs, it is written:

The FFS file `C:\Users\...\inspector.ffs' failed the CRC check.  It is corrupt, and cannot be read
A fatal error has occurred. Check the logfile above for details
Failed to specify the feature index as constraints on the reader

 

Any thoughts?

 

 

3 replies

arthy
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • February 3, 2023

@Takashi Iijima​ , @daveatsafe​, @jdh​ , @Hans van der Maarel​, @david_r​  and others, any help would be greatly appreciated


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • February 6, 2023

Could you post a sample zip file? You can have garbage data in the excel sheets, the important thing is the file structure (sheets) and column names.


rahulsharma
Safer
Forum|alt.badge.img+10
  • Safer
  • February 7, 2023

Hi @arthy​ 

Can I request you check, what happens when you click on FeatureType to Read ellipsis (...)?

I run some sample tests locally and I get a list of potential sheets.(see below)

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings