Unable to dynamically update “Service Name” header while generating service-wise Excel reports

Hi everyone,

I am working on generating service-wise Excel reports in a predefined format. The report structure includes fields like WO, District, Technician, Total Cost, and a header section where I need to display the Service Name (e.g., Assess, Deliver, Install, Repair and Replace).

I am able to:

Place all tabular data dynamically

Calculate totals correctly

Generate separate files per service

However, I am facing an issue with dynamically updating the “Service Name” field in the header (Cell B1). See the reference Picture

The service name exists in a different dataset/column, and while generating each service-wise report, I want this header to automatically reflect the corresponding service name.

Problem:
The header value is not getting updated dynamically even though the rest of the data is working fine.

Requirement:

For each generated report (per service), the header “Service Name” should show the correct service (e.g., Assess, Repair, Install, etc.)

The format/layout of the Excel sheet should remain unchanged

Question:
What is the best approach to dynamically populate a header field like “Service Name” from another data source while generating formatted Excel reports