Hi all,
I want to read outlook subject and store into excel ,but it gives me error .when I store it into message box so it gives me correct result.
but I want to store it into excel.
Pls help
Use Write cell activity inside Excel Application Scope activity.
Hi @arpita2
Can you please help me with what is the exact error that you are getting. Without Error it is difficult to provide solution.
Regards,
Vijay.
I use it .and give the range in write cell, like A2 to A4 but bot is writing the one unread mail to the 4 rows in the excel.Main.xaml (8.6 KB)
pls check.
Because you specified range like this: “A2:A7”. That’s why.
Take one variable of type Integer and say ‘Index’ and initially assign 2 to it. And pass it to write cell like below:
Range: “A”+Index.Tostring
Value: item.Subject.ToString
And then increment Index value.
hello @arpita2
as a @lakshman said follow him. i just attached screenshot for reference
thanks
Happy Automation
Hi @arpita2
are you trying to add each Mail subject in a separate cell. if this is the case i changed the flow. please check it and let me know it is working or not.
Main (1).xaml (10.9 KB)
Regards,
Vijay
Instead of Write Range use Write Cell activity.
thanks everyone…
Now its working fine…
Hi @arpita2
Glad that it helped you to solve your problem. Can you please mark this thread as solved by clicking on the post which helped you.
Regards,
Vijay.
Hi,
If
i want to get the new outlook message and append into excel file but previous data should exist.
so I applied append activity instead of write range activity but it gives me error.
error-string can not be converted into system.data.datatable .
when I am using append activity
Hi @arpita2
While appending data to excel what is the variable data type ??? It should be of DATATABLE datatype. Please check the data type of the variable that you are using in side APPEND RANGE.
Regards,
Vijay
I used variable.subject.tostring.
and I am not able to understand that what should I use instead of to string?
Hey @arpita2
You can’t add variable.subject.tostring ==> This is of String data type.
and Append Range will accept only Datatable.
Can you please share your workflow ? i will change and check it from my side.
Regards,
Vijay.
hi @Vijay_Kumar_C
PFAMain.xaml (9.9 KB)
Please check
I want to use append .
Hey @arpita2
Changed the flow. Instead of Write Range i used Write Cell activity.
- Read all rows from Sheet1 (Assume 5 rows are there)
- Get Row count (Row count = 5)
- Increase Row Count by One.(Row count = Row count + 1(6))
- Use Write Cell Activity to write the data.(“A” +Row count = “A6”)
Attached workflow. Please check and let me know it is working or not.
Main.xaml (14.7 KB)
Regards,
Vijay.
thanks @Vijay_Kumar_C
Hey @arpita2
I am hoping that the solution i provided is working fine.
If this is resolved please mark above post as solution so that it will help others.
Regards,
Vijay.