The supplied POIFSFileSystem does not contain a BIFF8 'Workbook' entry. Is it really an excel file?

Hello,

I am trying to write headers into a .xls file for a scraping process. The FlexiCapture activites I am using to scrape and output data doesn’t always write all of the headers out and this prevents some of the forms I am scraping from being outputted.

I am using a write range to add the headers, but I am getting the exception message in the title, “The supplied POIFSFileSystem does not contain a BIFF8 ‘Workbook’ entry. Is it really an excel file?”. The full log and a screenshot of the activity with the exception message will be at the bottom of this post.

What has caused this error to occur, and how do I fix it?

The file must be .xls as the FlexiCapture activities will write only to xls or CSV.

Thank you in advance. Apologies if this is poorly explained.

Screenshot:


Full log exception message:
20.4.1

Source: Write Range

Message: The supplied POIFSFileSystem does not contain a BIFF8 ‘Workbook’ entry. Is it really an excel file?

Exception Type: System.ArgumentException

RemoteException wrapping System.ArgumentException: The supplied POIFSFileSystem does not contain a BIFF8 ‘Workbook’ entry. Is it really an excel file?
at NPOI.HSSF.UserModel.HSSFWorkbook.GetWorkbookDirEntryName(DirectoryNode directory)
at NPOI.HSSF.UserModel.HSSFWorkbook…ctor(DirectoryNode directory, Boolean preserveNodes)
at NPOI.SS.UserModel.WorkbookFactory.Create(Stream inputStream)
at UiPath.Excel.WorkbookFileXls…ctor(String workbookPath, Boolean createNew)
at UiPath.Excel.Activities.WorkbookActivity1.ConstructWorkbook(String path, String password, Boolean createNew) at UiPath.Excel.Activities.WorkbookActivity1.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.AsyncCodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

This seems to be an intermittent issue. Hasn’t occured again since I posted this