I am facing an error while Adding the Queue Items to the Data Row using Add Data Row.
These are the steps I am following:
Build Data Table : Output - DT_Reporter
Get QueueItems : Output - QueueItems
For each Item, in Queue Item,
I am assigning the Queue values to a String Variable , I can able to see the values when I print through Write Line Activity.
Add Data Row - output DT_Reporter
Filter Data Table
Write Range Workbook
when i run the process, i am getting Write Range: Object reference not set to an instance of an object: Null Value Exception
I figured out that the Add Data row is not updating the values from Get Queue Items, hence the Data Table is empty, but I do not know how to resolve it, because when i print those individual Queue items in write line, there is data on them.
Can someone please help on the issue.
Thanks in advance
Why are you using Output DataTable ?
Try print DataTable Rows Count before filter to see if some row has been added
is it an issue with in_config?
before write_range activity
can you print out the value of
it might be that you dont have a value for in_config
Hello @rikulsilva , i have tried printing the Data row count. one after building the Data Table which is ‘0’ and another one after Add Data Row , that also updated as ‘0’. It should have a row in it. But it doesnt.
I guess not. There is an Asset with that file path which is updating fine.
The Data Table is having Null values which is actually not. As I could see the values in all those variables in Write Line which passed to the Array Row in Add Data Row
Here is the Output screenshot
Highlight1: Data Row count after Building a Data Table = 0
Highlight2: output from Get QueueItems (writeline: QueueItems.ToString)
Highlight3: Output from QueueItems Variables Writeline (which is as expected )
Highlight4: Data Row Count after Add Data Row = 0
Can you try printing the data row count in below places
- After For each queue Items
- After Filter Data Table activity
I think, the filter condition is removing all the rows from the data table, if any row count is displayed after For each. then filter data table condition need to be tweaked
Put a break point at build DataTable and run you workflow in debug mode. After run, use step into in debug tab so you can go and check output activities individually in imediate pane or locals pane.
This way you also can check if try fails and catch branch do something or filter activity removes rows
can you try printing your data row count before the “filter data table” activity to check the count.
From the workflow, it seems to be you are printing the count after the “filter data table” activity.
also, can you try to use write line activity before “Write Range workbook” activity to check the path of the file.
Hi @Venkat4 , I have tried printing the path of Output file and it is throwing Null Exception. Hence I manually added the file path, and the exception is gone now.
Still, There is no data being written into the excel since the Data row count is still 0 even after adding the Add Data Row.
As @Anil_G suggested, atleast the Column names should be written to the excel. but the sheet is empty and execution is ending without any errors
please check in variables if multiple variables created with DT_Reporter name. if multiple are created delete one variable and try to rerun the workflow.
Also, I see you have output data table activity used. please disable the activity.
Hi @Venkat4 ,
Thank you for your advise.
Rather than passing the File Path variable, I have directly given the file path, and it worked.
Data is writing into the excel now.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.