Krithi1
September 22, 2025, 7:04pm
1
I have data table(DataTableDt) like this..
FileName FilePath
Main c:\data\main\main.xml
Archive c:\data\archive\archive.xml
Logs c:\data\logs\logs.xml
I tried using the following two expressions to pull the file paths and both of them giving me null. What could be wrong here?
DataTableDt.Rows(1).Item(“FilePath”).ToString
DateTableDt.Rows(1)(“FilePath”).ToString
1 Like
Hi @Krithi1
Are you sure there is data in datatable?
Can you check printing using below:
DataTableDt.Rows.Count
If there is data, then try using below syntax’s
DataTableDt.Rows(1).Item(1).ToString
DataTableDt.Rows(1).Item(“FilePath”).ToString
Alternatively, try reading using below activity:
The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...
Hope this helps.
Krithi1
September 22, 2025, 9:05pm
3
Hi @sonaliaggarwal47
I do have count from the table. but still the expressions are not working
Yoichi
(Yoichi)
September 22, 2025, 10:42pm
4
Hi,
Can you check and share content of the datatable from Locals panel using breakpoint in debug run?
If there is expected data, also check if the command works in immediate panel?
Regards,
Anil_G
(Anil Gorthi)
September 23, 2025, 2:20am
5
@Krithi1
One possible reason could be that both columns are consider together as a single column instead of 2..please check the same
Along with row count get the column count as well to know
If column count is 1 then it read as single column..if count is 2 then either header is not taken or it has an extra space or so
Cheers
ashokkarale
(Ashok Karale)
September 23, 2025, 3:13am
6
@Krithi1
Add breakpoint and debug the code to check the content of the Datatable.
You are using the correct expression to access the value.
Krithi1
September 23, 2025, 1:35pm
7
Hi all,
Its my bad. I was pointing a wrong file. Thank you all.
1 Like