Skip to main content
Question

Skip (header) rows in excel


Hello folks,

 

 

I'm sure someone has ran into this issue before, but I can't seem to find any intuitive way of accomplishing this.

 

 

I am trying to setup an excel spreadsheet reader with the constraint that my header (column name) data is contained on row 3 and my actual data begins at row 4.  Row's 1&2 contain groupings of the column names (in row 3) and can be disregarded all together.

 

 

How can this be done in an FME workbench?  Is it possible out-of-the-box? or is custom coding/scripting required?

 

 

Thanks in advance.

 

 

Regards,

 

JP

4 replies

david_r
Evangelist
  • April 30, 2013
Hi JP,   here is a way to accomplish this (tested with FME2013sp1):
  • Make a copy of your Excel input file with the field names on the first row.
  • Open FME and create your reader input type. This will create an input feature type with the correct field name definitions.
  • Set the Start Feature value (=2 if you have one header line, etc)
  • Point your reader to the Excel file with the header
This should hopefully give the desired result. Let us know!   David  

  • Author
  • April 30, 2013
Hi David,

 

 

Thanks for the quick response and for the advice/suggestions.  In the fewest words possible ... I'm trying to provide a client with a workflow to upload an excel file to FME server, which ultimately updates a featureclass.

 

 

Of course, to make my solution appealing, I would like this to be automated (after uploading) and also minimize any pre-load formatting of their (single worksheet) excel file which contains (non-standardized nor database friendly) header names that are not on the first two rows :(.

 

 

At first, I thought some startup python scripting would be ideal, but a colleague suggested converting to CSV first, which may be easier to work with.  Still looking into that but will continue to explore any and all other options.

 

 

I'll provide an update once I find an appropriate solution, but any more suggestions are always welcome.

 

 

Thanks again,

 

JP

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • May 10, 2013
The new Excel Reader in FME 2013 SP2 will definitely do this easily for you. Beta should be available very very shortly -- drop a quick email to support@safe.com to be notified once it goes online.

  • May 24, 2013
@Dale,

 

 

I'm testing the sp2 beta related to something else, but this is very useful as well.

 

The 'Start Row' parameter works well, but can the reader also pick up column headings starting at row 'x'. Now I'm using the workaround mentioned above by David R. But that would be an awesome addition to the reader.

 

 

Cheers,

 

Niels Hoffmann

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