Headers Missing in Emails Generated with 'Create HTML Content' Activity When Mapping Data from a Data Table

Why are the headers of a filtered data table missing in the email generated using the 'Map Data Tables' option within the 'Create HTML Content' activity in UiPath, even though the headers exist in the data table variable?

Issue Description:

When mapping a data table variable to the "Create HTML Content" activity, the variable includes headers. However, the resulting table in the generated email does not display the headers.

Steps to Resolve:

Follow the steps below to ensure headers are displayed in the generated HTML table:

  1. Export the content of the data table variable to an Excel file using the "Write Range" activity.
  2. Use the "Read Range" activity to import the data back into a variable, ensuring the "Has Headers" option is disabled.
  3. Assign the resulting data to a new variable or argument.
  4. Use this variable or argument in the "Create HTML Content" activity to map the data into the email’s table content. This ensures headers are displayed correctly.

Resolution:

The issue was resolved by implementing this workaround. By disabling the "Has Headers" option in the "Read Range" activity and re-importing the data, the variable passed to the "Create HTML Content" activity properly included headers, and they were displayed correctly in the email.