Write Range - Issue

Hi everyone,

I try to used a write range activity, I made a simple extract from a web page and got this error, the file is created, “Feuil1” is correctly spelled…

Thanks

1 Like

Check DTenjeux variable scope

1 Like

Done

1 Like

Do you mean that the problem is solved?

1 Like

Sorry no, I mean i already checked that.

1 Like

This kind of erreur is shown when a variable is not initialised. The only variable I see is this one. (and I should have noticed that you have the datatable schema in the debug window)

1 Like

I put New System.Data.DataTable for this variable and still the same problem
It"s weird because it’s been a years that i’m using this activity without issues

1 Like

I see in the screenshot that the datatable has its schema set. The problem is probably not there. The only other variable I can think about in a WriteRange activity (workbook flavor) is Password.

Could you please copy the text inside $ExceptionDetails, please?

1 Like

19.10.4+Branch.support-v2019.10.Sha.fe819a658cad0585a64d2f8af94fad5c30b8d122

Source : Write Range

Message : La référence d’objet n’est pas définie à une instance d’un objet.

Type d’exception : System.NullReferenceException

RemoteException wrapping System.NullReferenceException: La référence d’objet n’est pas définie à une instance d’un objet.
à UiPath.Excel.Activities.WorkbookActivity`1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
à System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
à System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

1 Like

et les paramètres du WriteRange ?

1 Like

RemoteException wrapping System.NullReferenceException: La référence d’objet n’est pas définie à une instance d’un objet.
à UiPath.Excel.Activities.WorkbookActivity`1.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
à System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context,
IAsyncResult result)
à System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)

“Name”: “Write Range”,
“Id”: “1.43”,
“InstanceId”: “30”,
“TypeName”: “UiPath.Excel.Activities.WriteRange”

1 Like

Just for experimenting, could you please check “AddHeaders”?

EDIT: By the way, in your two screenshots the StartingCell are different.

1 Like

Hi @Pierre_PARIS,

Are you Using any Excel application Scope?
If Your Using any excel applicaton Scope Place the Write Range Out Side Of the Sequence Or If you Not using any application Scope Remove the Extract structure data variable and again create a new variable and pass it and keep the write range inside the do And keep your Starting cell empty “” like this and enable the add headers

regards,
Gulshiyaa

1 Like

The excel application scope in not working on my PC, it says that Excel is not install
This is why I use the other write range activity

1 Like

After multiple test, If i create a simple Excel file, It works but it is not working while i’m using a other file, in which there is already formula and data inside.

It a problem of excel file, there is some restrictions ?

Thanks in advance

1 Like

Hi @Pierre_PARIS

If you dont have excel application on your system it will not work.Install excel and enable in your uipath studio then work

regards,
gulshiyaa

1 Like

I pretty sure that there is 2 type of “write range” activity.
One working inside an excel application scope and the second one working alone.

Again it works on a different excel file so it’s should be link to the excel file itself.

1 Like

Indeed, WriteRange activity have an “Excel” and “Workbook” flavor, that latter doesn’t require an excel scope (that’s why I use it) and AFAI doesn’t require you to have Excel in your system.

I doubt that the error message as shown in the opening post is related to the output file by itself. Could you place just before your WriteRange activity two other activities?

  • OutputDataTable
  • LogMessage (with the previous output)

If after your changes you introduced new variables or if your error message is different, please attach updated informations.

1 Like