Hello and welcome to Microsoft Q&A @Dileep K
If I understand correctly, you want to add an extra header to your excel, like in below picture.
Out of the box, the normal data like in row 4 and below is done easy. However inserting the rows 1 and 2 is the ask.
I'm thinking it would be easier to split this into 2 tasks:
- First write the excel with just the data header and data as in row 4+
- Use a Synapse notbeook to load the excel, and then insert rows at the beginning and write the special headers. Then save the result back to excel.
While pre-pending the header rows may be possible in a dataframe, I worry about type conflicts. This form of editing is not in native excel.
Instead I would consider using an excel library made specific for excel.
Example inserting rows in dataframe
Example inserting rows with openpyxl
Please confirm if this is the sort of thing you are looking for, or if I totally misunderstood the ask.