"File error" Message when Spreadsheet is Opened
Posted: Tue Sep 22, 2015 6:47 pm
I am trying to track down the source of a "File error: data may have been lost" message which we see when opening our spreadsheet.
We have used the same code successfully using version 5.20.05 of the XLSReadWriteII5 component in Delphi XE2. We are now moving our development to Delphi XE7 and using version 5.20.59 of the component but are experiencing the error mentioned above.
Basically, our process takes a spreadsheet (having Freeze Panes on the first four rows), we populate specific cells and then we save the results as a new spreadsheet. Cells are altered in both the Freeze Pane range as well as outside of that range. When we open the new spreadsheet, the "File error: data may have been lost" message is displayed by Excel. If you click OK, the message closes and the spreadsheet is displayed, but there are no longer any Freeze Panes in this spreadsheet (the rows are there but now scroll just like everything else).
Using Excel, we just used the "unfreeze panes" option and saved the spreadsheet that is used as our source. The end result was the same. The "File error: data may have been lost" message is still displayed when we open the modified spreadsheet. So it would appear that the Freeze Pane isn't the issue.
While I don't believe the following has any relationship to the message, I will add that the "template" (the source Excel spreadsheet) is stored as a blob in an Interbase database. Our process pulls this "template" spreadsheet out of the database and we modify it before saving our modified results into a different table in the Interbase database. This gives our users an archive of all of their reports. When they want to view a report we extract it from the blob and open it with Excel.
I realize that this isn't a lot of information to go on, but I hope that you can either ask me to provide something more specific or offer suggestions on what we may need to change when using the newer version of the component AND newer version of Delphi.
Thanks in advance for any assistance.
We have used the same code successfully using version 5.20.05 of the XLSReadWriteII5 component in Delphi XE2. We are now moving our development to Delphi XE7 and using version 5.20.59 of the component but are experiencing the error mentioned above.
Basically, our process takes a spreadsheet (having Freeze Panes on the first four rows), we populate specific cells and then we save the results as a new spreadsheet. Cells are altered in both the Freeze Pane range as well as outside of that range. When we open the new spreadsheet, the "File error: data may have been lost" message is displayed by Excel. If you click OK, the message closes and the spreadsheet is displayed, but there are no longer any Freeze Panes in this spreadsheet (the rows are there but now scroll just like everything else).
Using Excel, we just used the "unfreeze panes" option and saved the spreadsheet that is used as our source. The end result was the same. The "File error: data may have been lost" message is still displayed when we open the modified spreadsheet. So it would appear that the Freeze Pane isn't the issue.
While I don't believe the following has any relationship to the message, I will add that the "template" (the source Excel spreadsheet) is stored as a blob in an Interbase database. Our process pulls this "template" spreadsheet out of the database and we modify it before saving our modified results into a different table in the Interbase database. This gives our users an archive of all of their reports. When they want to view a report we extract it from the blob and open it with Excel.
I realize that this isn't a lot of information to go on, but I hope that you can either ask me to provide something more specific or offer suggestions on what we may need to change when using the newer version of the component AND newer version of Delphi.
Thanks in advance for any assistance.