I have billing information for several customers in an Excel spreadsheet that I want to convert to actual Excel invoices. I am using Excel Application Scope, Read Range and For Each Row and Assign activities.
I am not sure 1) what variables to create and 2) what to put in the ForEach and In columns in For Each activity. Also 3) not sure what to use in a To and the column after the = in Assign.
Message: Object reference not set to an instance of an object.
Exception Type: System.NullReferenceException
RemoteException wrapping System.NullReferenceException: Object reference not set to an instance of an object.
at UiPath.Core.Activities.ForEach`1.StartLoop(NativeActivityContext context)
at UiPath.Core.Activities.InterruptibleLoopBase.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Hi Anil, to explain a little further. I am trying to use Assign to create invoices from an Excel file where in Column A are the invoice numbers from 3331 to 3337. Can you explain then what value I assign to it? Bgr. Hallgrímur
If you are already in for each excel row then as mentioned above you only need to get values which is by using assign…here invoivenumber is a string type variableinvoicenumber = currentrow.byfield("InvoiceColumnName").StringValue
Last try Anil, I promise.
Below is a copy of the Excel file A1-D8, where the InvoiceNumber is in A1 and 3331 is in A2. What should I type into the Value for the Invoice Number in the Assign activity? Brg. Hallgrímur
InvoiceNumber InvoiceDate CustomerName CompanyName
3331 07/11/2018 Fred Mendenhall
3332 07/11/2018 Susy Jensen
3333 12/11/2018 Stanley Call North Idaho Woodsman
3334 12/11/2018 Renee Armstrong Sanpete Pioneer Furniture
3335 13/11/2018 Scott Billings
3336 13/11/2018 Jason Young Exotic Pens from Platteville
3337 14/11/2018 Garren Linford Corvallis Creations
What you have in assign is correct…but as per error your datatable used invoicedata is empty…please check if you have used read range and if the datatable is assigned to output variable