How to get excel column range ? If excel is A1:E9 then take screenshot of A1:D9

Hi Team ,

I have excel where I have to read excel and take screenshot of only column-1(Have to ignore last column)

→ I don’t have any issue in taking screenshot but having issue only with column range

For example 1) If I have excel data from A1:E9 then I have to take screenshot from A1:D9 → Wants to ignore last column

  1. If I have excel data from A1:L9 then I have to take screenshot from A1:K9 → Wants to ignore last column every time

→ I am able to get row count by using dt.row.count and can use it but having issue with column only

→ We don’t know how many columns will be in excel … We just read the entire excel and take screenshot except last column … I want to know last column and minus 1 (If last column is H9 then I have to take screenshot up to G9)

@ppr

Thanks,
Naresh

Hi,
I hope this will help you,

Excel Application Scope:
- Input: Path to the Excel file

  1. Read Range:

    • Range: Specify the range of columns you want to read (e.g., “A1:D9”)
    • Output: dt (DataTable)
  2. Remove Data Column:

    • DataTable: dt
    • Column Index/Name: Specify the index or name of the last column to remove
  3. Take Screenshot:

    • Add the activities to take a screenshot as per your requirements
  4. Close Excel Application Scope

My requirement is to read entire excel and take screenshot except last column.

We don’t know how many columns will be in excel … We just read the entire excel and take screenshot except last column

@Mandava_Naresh

Are you using this activity to take the screenshot? or something else?

Thanks!

dt.Columns.Count

dt.column.count gives number like 5 but I want column range like E8 or E is also fine

not this one

sound like getting the column letter
grafik

Thank you very much

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