Skipping the top 3 rows in Excel

I wanted to apply this video by BotsDNA “https://youtu.be/SlLMDPv4ZUk?feature=shared” - and skip the first 3 rows of my excel spreadsheet / make the bot treat the 1st 3 rows as Headers so that the bot ignores them. (I didn’t succeed).

I need this for a data template that has to have the top 3 rows untouched by the bot.

Update: I need the Bot to ignore the 1st 3 rows of data in the excel spreadsheet - I don’t want to use a solution that needs me to write the spreadsheet into a data table - the spreadsheet is the data table. The goal is not to use BotsDNA’s solution - the goal is to ideally make the bot think the top 3 rows are Headers - so that it ignores them.

I’m more about finding the quickest route to functionality - no matter how unconventional the solution is - even if features are being used in strange ways they weren’t intended to be used in.

Update 2:
Solution is to replace “Excel.Sheet(“Sheet1”)” for the for each row activity etc (with Headers enabled), with “Excel.Sheet(“Sheet1”).Range(“3:3”)” - the solution from Henrique Lima uses 1 column only.

Hi @jezaia.vanderwatt

Try this

DT.AsEnumerable().Skip(3).CopyToDataTable()

Cheers!!

Yes - but IN what? What am I assigning it to? The Entire Spreadsheet isn’t a data table option that I can apply the “DT.AsEnumerable().Skip(3).CopyToDataTable()” to

You know what - I’m gonna see if I can set the top 3 rows as read only - that might do the trick.

Hi @jezaia.vanderwatt

If it is an excel then use the read range workbook activity to read the excel and store in a datatable, for that datatable use the below expression to skip the first 3 rows.

DT = DT.AsEnumerable().Skip(3).CopyToDataTable()

Then Write the datatable to excel by using Write range workbook activity.

Hope it helps!!

Unfortunately not, but thank you for trying. :grin:

Had you tried using a Range with offset e.g A4

Hi @jezaia.vanderwatt

How about this ? Where A3 is the start row

1 Like

Could you be elaborate your query… Then only we understand and try to provide the solution… @jezaia.vanderwatt

@jezaia.vanderwatt

In read range you can kust give A4 and it would start reading from there only and will not read first 3 rows at all

Cheers

1 Like

Thank you so much - this looks like a simple thing I should have learnt already. (I love it when the solution is simple).

Is there a specific group of tutorials you used outside the UiPath Academy?

we would encourage

  • still execise everything what you have learnt from UiPath Academy courses
  • pickup Forum Topics and check the solutions for learning
  • define your skillset and train yourself within along with additional materials e.g. our cheatsheets:
    🦉 🔖 [CheatSheet] - Filesystem APIs
  • check you skills by e.g. reading a topic and try come up with the same flagged solution or an proven alternate

Once you have done this for a while we are sure that you will have progressed and will have extended your knowledge.

Last to mentioned:
Check out the different YouTube channels from Members, which also will help for learning. A highly recommended one:
Understanding the 6 Debugging Panels of UiPath in the easiest way possible! - News / Tutorials - UiPath Community Forum

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.