How to skip header in excel

Hi guys,

For some reason, I have to deal with an excel that has an header, something like below.

How do you deal with that?
Any trick to skip the header and assign the columns properly without the header messing up with Venus?

Thank you

Hi @KevinJ,

There are two options that can used here:

  1. When selecting the Sheet Name there is the option to add a custom range of cells that are processed during error handling. The Help file for the “File: Open” step discusses this, but the syntax is “SheetName$CellX:CellY”. For example, using your image, the selection would be “SheetName$A3:G6” to get all of the values listed. This ensures the use of the Column Headers as seen in row 3. Two important notes:
    a. The last row of the file needs to be known to ensure all desired data is selected. A string variable can be used in the Sheet name parameter that accounts for this.
    b. The Mode needs to be set to “Open file to read”. If using Append or Write, then header can get overwritten and the step will error.
    For another example, see below.


  2. This option acts more like normal File Handling in that the last row of the worklist doesn’t need to be known, however it ignores the Column Headers, instead selecting columns by position. To use this technique, select the “No Header Row” checkbox, and set the Column names to “F1”, “F2”, “F3”, etc. to line up with the columns in your worklist (A through n). The Column Specification Helper can do this as well, as it also has the option for “No Header Row” (image refers to my previous example worklist):


    In the method after the “File: Open” step, add a “File: Set Position” step, which allows for skipping of rows during file handling. In this case, set it to skip 3 rows from the first row to line it up with row 3:


    This technique can be used with all Modes without issue, but can’t be used if the Column Headers move position from one worklist to the next (rare, but possible).

Thank you,
Dan

9 Likes

Hi Dan,
Amazing, thank you very much!
Exactly what I was looking for.

Gonna go with the second option as my file will always have the same format.

Have a great day.

K

1 Like

Hi Dan,

Tested, works like a charm.

Thanks again!

I really appreciate it!

Cheers,

K

3 Likes