I have a process that sends a notification email to email addresses. The notification is sent to each unique vendor via the corresponding email address.
However, we have to write detailed information from the spreadsheet on the body email values under Name1, Document Date, Reference, Amount in Cur, Clearing data, currency, document number for each of the emails
here is body of the email for example for one vendor (3006)-
We continue doing this for each unique vendor (for 3008, 3157 and more depending on how many vendors we have - please refer to the attached excel file for reference
Do you need the email to be in a table format in the body of the email only? If not, you could create the table as excel attachments and send the email as attachments.
If the content needs to go in the body of the email, the best way to do is to use a html email template and set the values as dynamic.
It needs to be in a table format and in the body of the email. We do not want to do the attachment. I am more interested to see the workflow (starting from reading the spreadsheet and composing email based on the data provided).
Update - I was able to add the column names on tio and remove the columns that we do not need using the following revised expression.
strMail + vbCrLf + vbCrLf +
String.Join(" ", currentKeyValuePairOfTextAndDataTable.Value.Columns.Cast(Of DataColumn).Where(Function(c, i) i > 0 AndAlso i < currentKeyValuePairOfTextAndDataTable.Value.Columns.Count - 1).Select(Function(c) c.ColumnName)) + vbCrLf +
String.Join(vbCrLf, currentK
However, I still want to see the format structured in the body of the email the same way we see in table. Please let me know your insight!