I am not able to write Excel header when the data table is empty/No rows. I checked the Add headers options in write range inside Excel application scope.
I could write headers when there is a row in Data table. Can anyone please suggest to write Excel headers when data table is empty?
May I know why you want to write headers when you don’t have any rows in the Datatable?
Before writing into excel sheet use below expression to check whether Datatable contains any rows or not. If it is more than zero then write it else stop writing.
My requirement is always write excel headers irrespective of row count in the data table. I gave headers in First row of data table and unchecked Add headers in write excel activity. Is there any best way to approach this?