0

I am new to FME.

I have 100+ Excel workbooks, each of which has 2-4 worksheets in them. To prep to do some schema mapping, I'm trying to read out all of the attribute names to a new spreadsheet (Excel or CSV, doesn't matter).

So far, I have been able to create a workflow that can handle 1 workbook at a time using FeatureReader -> ListExploder -> AttributeKeeper -> AttributeManager -> CSVWriter

However, I'm running into an issue now when I try to run multiple Excel files at once, I get the following errors:

The schema did not contain information for sheet 'test_data'
Excel Reader: The schema did not contain information for sheet 'test_data'
Excel Reader: The schema did not contain information for sheet 'test_data'
Failed to obtain any schemas from reader 'XLSXR' from 3 datasets. This may be due to invalid datasets or format accessibility issues due to licensing, dependencies, or module loading. See logfile for more information
Failed to obtain any schemas from reader 'XLSXR' from 3 datasets. This may be due to invalid datasets or format accessibility issues due to licensing, dependencies, or module loading. See logfile for more information
The below feature caused the translation to be terminated
FeatureReader_<Rejected> (TeeFactory): FeatureReader_<Rejected>: Termination Message: 'FeatureReader output a <Rejected> feature.  To continue translation when features are rejected, change 'Workspace Parameters' > Translation > 'Rejected Feature Handling' to 'Continue Translation''
FeatureReader (QueryFactory): Termination Message: '%0'
Creator_CREATED_-1_30_Player (RecorderFactory): FeatureReader_<Rejected>: Termination Message: 'FeatureReader output a <Rejected> feature.  To continue translation when features are rejected, change 'Workspace Parameters' > Translation > 'Rejected Feature Handling' to 'Continue Translation'' 

It seems to be an issue with the "Feature Types to Read" parameter and reading the feature types on the fly for the FeatureReader transformer as each Excel file is read in.

Any ideas how to make this work?

My workbench file is here if anyone would like to take a look at it. Any guidance or links that might point me in the right direction?

1 Answer 1

0

I had some success with this. In your feature reader, click the down arrow on the right for 'Dataset' and select Multiple Folders/Files.

enter image description here

You can select a whole folder with a filter (e.g. MyExcelFiles*).

Then, click on the Parameters... button and select all sheets.

Then, in Feature Types to Read, click the three dots and select all feature types.

This worked for me, and I got all sheets and all attributes.

enter image description here

The only thing I noticed is that the file name doesn't seem to be extracted using the schema features only. So, your workbook field is empty as there is no fme_basename. A potential workaround for this is to read the data features as well and expose the fme_basename and/or fme_dataset attribute, and join them back to the schema features. However, this could significantly increase the time your workbench takes to run if you have a lot of data.

Hope this works for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.