Unable to export excel file in selenium c# code

Open
Nagaraj Chatiri asked 23 hours ago

We are facing an issue with exporting a Flexmonster report to Excel through Selenium automation.

We are using the following Selenium C# code: Here strFilePath I habe given my name to file and used as variable.

js.ExecuteScript("flexmonster.exportTo('excel', { filename: '" + strFilePath + "' })");

Issue:

  • The exportTo() method is being executed.
  • A .tmp file is created in the target folder, but the Excel (.xlsx) file is never generated.
  • No exception is thrown from the Selenium code.

Manual test:

  • If we manually click the Export to Excel button in the Flexmonster UI, the Excel file is generated successfully in the same environment.

Additional information:

  • This automation code had been working correctly until 30 June 2026.
  • Starting from 1 July 2026, the same Selenium automation code no longer generates the Excel file.
  • No changes were made to our Selenium automation code.

Please sign in or register to submit your answer