Export to Excel function: Attempting to write a row[4] in the range [0,157943] that is already written to disk error

Certified Senior Developer

I am getting this error on Export to Excel function when I am exporting the data in excel via SQL query- 

The following error was raised by the Export to Excel function: Attempting to write a row[4] in the range [0,157943] that is already written to disk.

We have this functionality where there is a Create and Modify workflow and we want to create a excel template in both scenarios using SQL query.

The strange thing is  - We are using same excel base template on both Create and Modify workflow but this error only occurs when executing Modify workflow.

We have formula on A column which is populated on 4th row and excel headers till 3 rows so the starting cell is B5. 

Can anyone please help me out to understand the root cause here?

  Discussion posts and replies are publicly visible