I am tring to open the excel file through the lotusscript.
I am using workbook.open command. All files open properly and get processed.
But for some files am getting the prompt message as “Excel encountered an error and had to remove some formatting to avoid corrupting the workbook. Please re-check your formatting carefully.”
This causes the code to stop until I click ok button on message.
Please let me know how to avoid this error. How to identify such files.
The files alreasy exist in documents I have to process the documents based on data in excel file. We can not change the data in file.
Subject: This is most likely an Excel version error
as in, you’re using a different version of Excel to that which created the Excel file, so there are compatibility issues between the versions. Or the app that wrote the Excel file wasn’t 100% correct.
If you search google for the error:
Excel encountered an error and had to remove some formatting to avoid corrupting the workbook. Please re-check your formatting carefully.
It’s likely an interaction between the version of Excel and the file extension (xls vs xlsx). Make sure you have the extensions matched to the version of Excel.