Can someone help me to paste table to mail

Can anyone please help me to copy the following datatable to email.
I want to exclude the 1st row (column0, column1…) in the email. Also i need to copy columns from 0 to 7 only
I tried multiple times. But not able to get a proper format.
check.xlsx (11.3 KB)

Thanks in advance

Hi @shilpa_p ,

Could you try following the Below Steps :

  1. Use the WorkBook Read Range Activity to Read Excel file from the Range "A2"

  2. Next use the Below Workflow to Remove Empty Columns in the Datatable
    Remove Empty Columns.xaml (11.7 KB)

You would require to Invoke this as a Workflow, from your main workflow and supply the arguments.

or if you do know the Column Names before hand, we can pass the Column Names to the Below Expression to Keep only needed Columns :
Using an Assign Activity use the Following Expression :

DT = DT.DefaultView.ToTable(false,"Column1","Column2","Column3")

The Above Expression would keep only the "Column1","Column2","Column3" in the Datatable.

  1. Next we can make use of the Below Component to Convert the Datatable to HTML Table.

Let us know if you are still facing issues.

use… Create HTML Format Activity

Thank you I shall try :slight_smile:

1 Like

I will check this . Thank you :slight_smile:

Can some one help me




I am getting the output in mail as shown in image-2
But i need as its in image 3
eg: In 3rd column , the 2nd occurrence of CINV… (marked in red line)should start on next line in the same row
Is there any modification that i should do in the expression(image attached for it)

Thanks

@shilpa_p ,

Could you let us know Are you trying to Add Table to Mail or Retrieve Table from Mail.

Also, If you’re Adding Table to Mail, then could you show us the the Implementation for Rows Addition ?

I believe the Above Image is for the Addition of Column Names. So we would need to check the implementation for row data.

Mail_table.xaml (18.4 KB)
Can you plz check the implementation

@shilpa_p , Check this Updated Workflow :
Mail_table.xaml (17.8 KB)

Change the Location and File names, as I had used one of the Excel files from my machine to test.

Most Probably the Mistake was in Not Closing the <tr> using </tr> after For Each Activity.

The Append Line was outside the Outer For Each Row, Hence the data was appended irregularly.

Let us know if you are still facing issues

Thanks
But, Still the problem exists in the mail. Its the same

@shilpa_p Could you provide us with the created Text file of the HTML Table?

Hi
Sorry for the delayed response. I got stuck in the middle of the code and was unable to reach the mailing part. The requirement was changed.
Please can you help me with this
Excel_Data.xlsx (11.3 KB)

I have a excel file which has 2 sheets; employee details and mail IDS
for each row in employee details, it should check if the name matches with name in mail ids sheet, if the name matches it must extract the corresponding mail id and mail the whole row from employee details to that ID in the form of a table

@shilpa_p , As we could see the Previous Requirement was Satisfied/ Topic Solved.

Could you Create a new Topic, with the new requirement at hand. We intend to keep One Major Requirement as One Topic/Post.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.