Table Extraction- Write DataTable to Excel Error

Hello,

I’m trying to look up the employee number of a list of companies (list is in excel), and trying to extract the number and write it into a new column on the excel document. I keep receiving the following error: Write DataTable to Excel: The source data has no rows or columns. I have included screenshots of my sequence. Any help would be greatly appreciated!!

rest of the sequence

Lastly.

Hi @Heydi_Reyes

Before writing the data table to excel check if the table is getting extracted .
Keep a message box after Extract Table Data activity and verify if the count is equal to the table extracted by below condition:
ExtractDataTable.Rows.Count
If the row count is 0 then your table isn’t getting extracted.

Check and update.

Hope it helps!!

In the Extract wizard, what do you see when you click Preview?

Obviously the datatable isn’t being populated so you have to figure out why.

HI @Heydi_Reyes
Welcome to community

1.try to check the value of extracteddatatable
Place a message box orl og message and
Check extracteddatatable.rows.count

2.can please place the write range workbook activity outside of for each row in datatable

Hope this helps

@Heydi_Reyes

Here you take read range activity does not give any datatable variable

Instead of for each excel row you read the data to the datatable right then take for each row in datatable

@Heydi_Reyes

Few things

  1. In read range no datatable is provided that is not needed at all for each row in excel will take care of going through each row
  2. In the typing to you can directly use currentRow.ByIndex(0).StringValue
  3. In write range you can specify only the start cell and it would write all the data Excel.Sheet("SheetNams").Range("B2")
  4. Looks like data is not getting populated in the extract datatable…either selector is not dynamic or wrong or there is no data

Cheers

Hi Anil,

Thank you so much for the feedback! Please see my questions below:

  1. Where should I insert the following information? In the For Each Excel Row table or the Write DataTable to excel table? Sorry i’m very new to RPA so the more detail you can provide the better.

Thank you!

@Heydi_Reyes

Can you provide the value in the read range

Hi Shiva,

The value in the read range is the company name “Google”

You are using for each excel row
Before that you need to
Create a variable for the output of read range excel

@Heydi_Reyes

This is to be used in type into activity

In the destination field of write datatable to excel activity

And read range can be removed

Hope this helps

Cheers