Skip to main content
Solved

Changing the header name of table based on cell location

  • February 17, 2016
  • 3 replies
  • 97 views

Hi,

I am looking to rename a cell in an excel spreadsheet reader using the cell's location (e.g. E1) rather than the default option in AttributeRenamer of choosing a header (e.g. RATECAT, SERVICEADDRESS, ect.). I currently receive the dataset with the headers, like what is shown in the image provided, with one of the headers being the date. Every month this header changes... Is there a way for me to rename the cell in location E1 rather than renaming based on the field "2015/10"?

Thank you in advance!

Best answer by takashi

If you set 0 (or blank) to the "Field Names Row" and set 2 to the "Cell Range" in the reader parameters dialog, the Excel column names (A, B, C, ...) will be used as attribute names and the first (header) row will be skipped. Then you can rename the attributes with the AttributeRenamer, if necessary.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

pratap
Contributor
Forum|alt.badge.img+12
  • Contributor
  • February 18, 2016

Hi,

If you don't want to keep the header row, set "Cell range" to start from row 1 and Place the header with attribute creator and map the header back to required attribute.

Pratap


takashi
Celebrity
  • Best Answer
  • February 18, 2016

If you set 0 (or blank) to the "Field Names Row" and set 2 to the "Cell Range" in the reader parameters dialog, the Excel column names (A, B, C, ...) will be used as attribute names and the first (header) row will be skipped. Then you can rename the attributes with the AttributeRenamer, if necessary.


  • Author
  • February 18, 2016

Hi,

If you don't want to keep the header row, set "Cell range" to start from row 1 and Place the header with attribute creator and map the header back to required attribute.

Pratap

Hi Pratap and Takashi

Thank you both for your answers, they were great solutions and they both worked well for what I needed to do. Thanks again!

Amber