Skip to main content

Hi,

I have thousand of Excel files I need to read but all of them have different starting attributes line. Sometimes line 15 or 16 or 17.

(not me who developed that method of working….)

The attributes are all the same for all the files.

Any idea how I could have the Excel Reader to detect the starting line?

Thanks !

Are the attribute names always the same? If that’s the case you can read the file once with the regular reader and check lines 15, 16 and 17 with a TestFilter to see if any of them hold the attribute names, then pass them to different FeatureReaders where you’ve set the correct line number for the attribute names.


Wow that amazing! No idea how FME is doing that, but with the Reader with Field name = None, he recognizes the attribute line in all the files!

I just have to do a Tester to erase the first blank rows.

Thank you!!! I should have thought FME was so smart!

 


Hey I understand now how my attributes were added automatically in my CSV, even if my files don’t have the attributes starting at the same line.

First I read my attribute line with one CSV and I add the line to Field Names Line.

After adding the reader to the workbench, I update my Reader and then I modify the same parameter to None.

Then I update my Reader and I use a Tester to skip all the blank lines.

In the end, FME and me are smart! :P


Reply