Skip to main content

Hi everyone, I’ve got many excel files and I need to extract some values in specific cells from them, then write these values into a new excel file. These excel file come with same schema, but may with different sheet names.

For example, I got resume A, B and C, I want to extract NAME from cell B2, AGE frome cell C4, E-MAIL from D3 and PHONE from D6. And sheets name for resume A is ‘Jack’, for resume B is ‘sheet1’ and for resume C is ‘resume’. And now I want to write these information into a new excel, column A is NAME, column B is AGE, column C is E-MAIL and column D is PHONE.

I know this must be a very basic function for FME, but how can I make this possible, I tried to search from the community without any result, maybe I input wrong keywords due to I’m a non-English speaker, please help me out, if would be better for me to understanding if you can attach a screenshot or a workbench file.

Thank you very much.

Usually, a single line on an Excel sheet is a complete feature.

In this case, several lines of the sheet contain informaiton over one feature. Luckily, the position of the relevant elemants on the sheet is constant.

So this is not very basic functionality in FME.

You can trick the Excel reader into reading all sheets, by disabling the sheet name in the reader. This will add fme_feature_type as an attribute, containing the name of the sheet.

When all sheets are read, add a _counter, let the counter restart when fme_feature_type changes.

Now you can use an AttributeManager with a conditional value: for a certain _counter use the value of a certain attribute.

Finally aggregate on fme_feature_type, merge the incomingattributes.

I hope the attached example works, it should contain sample data.


Reply