You need to give a little bit more information but there are two ways of doing this.
The best way is if you have the Email Body from a Mail Activity such as Get Outlook Messages. In this case it is simple because the .body property of a MailMessage object can be converted to string and can therefore just be output directly to Excel using Write Cell. Alternatively if you have a bunch of mailmessages you could create a datatable and then output the full datatable to Excel using the Write Excel activity.
If you are using UI (i.e. you are scraping the text from the email) then the priniciple is the same. Convert the generic value to string and export it to Excel.
i need the 1st way of extracting table but the problem is at string… whole body content is extracted by a string… if i use write cell then in a single cell itself all body content gets placed… i need table like format in excel file also…
Im having one more doubt, how to create excel file… if I use create file option it is showing error as excel format is wrong… if anyone knows please help me
Excel write activities will create a new excel file if you point to a file that doesn’t exist.
For the formatting - you’ll need to parse the content to columns as you need. This may be simple or pretty complicated, depending on how the emails actually look like.
Actually you cannot write a string into an excel (as table) though there is a table in it.
You have to work in splitting your string according to space, newlines until we get the required table out of it.
If someone else wants to help. I want to make it easier i want all the content of the body from an email in a excel row, then i will convert the excel information with other procedures.I attach it if someone wants to help me mailaexcel.xaml (8.1 KB)
It is really strange for me it is coming. i really have to debug many of others also not getting this but for me it is coming.
before you were getting? if it is so then just add some code after that or let me know:)