SRoyi
June 14, 2023, 2:43am
1
Hi all,
I am trying to store my data in a new DataTable variable. Here is how the logic goes:
If there is an error in the excel sheet, it will add CurrentRow into a new DataTable called dtErrList.
However, every time I run it, it will show object reference not set to an instance of an object.
Cheers.
@SRoyi
You need to initialize your DataTable Variable with a Build Data Table activity before adding Rows.
Hope this helps
Thanks!
Anil_G
(Anil Gorthi)
June 14, 2023, 2:45am
3
@SRoyi
Please first give a strucutre to the dterrlist table…
You need initialize
Dterrlist = Nee DataTable
and for providing structure you can use below
Dterrlist = dtExtractdata.Clone()
You can use both in assign activities
Cheers
SRoyi
June 14, 2023, 2:48am
4
Hi there,
What I am trying to achieve is that should there be errors in my excel file, the process will first store my data from said excel file in the variable dtErrList. Afterwards I will delete all data on that excel file, and re-write it into the same excel by using Add Most Recent Data into excel. Hope this helps with understanding my situation
Cheers
SRoyi
June 14, 2023, 3:11am
5
Hi there,
Thanks for your solution! It worked for me.
Cheers
1 Like
system
(system)
Closed
June 17, 2023, 3:11am
6
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.