Changes in Flexcel lead to error messages?

Dear all

My environment: Windows 11 (latest update), Embarcadero Delphi 11. 3, VCL UI Pack 13.0.6.0, Flexcel 7.20.0.0, VCL Grid Excel Bridge 3.2, Microsoft Home and Business 2019 – de.

After the installation of the TMS products mentioned above I saw error messages that were unknown before:

  • FLEXCEL: LOGICAL ERROR (using AdvStringGridExcelIO. XLSExport)
  • UNEXPECTED CHARACTER ‘>’ AT POS 2 ON FORMULA: “=>”using (AdvGridExelExport.Export)

The XLS file (natively or after import) looks like this:
NR PARAM PARAM
1 .CSV .XLS
2 X =>

All cells are defined as TEXT in Excel
The same issue arises if = is used instead of =>

The workaround / solution is to input => as “=>” in the Excel file. Now it works as before.

This is just an information for other users!
An input in an Excel cell with = expects a formula: okay.
But if we go from one Flexcel version to the newer one, it takes at least some hours of work, to analyze why it does not work as before. I assume that Flexcel has been further developed – which is always welcome. Obviously I missed to get / find the information that there were changes that led to my issue.

Best regards HG Kneip

Hi,
This shouldn't have changed in newer versions of FlexCel, and even less in AdvExcelIO since it is frozen in using FlexCel 3. But if there is one thing we take seriously is to not break old stuff with newer versions, and we have a huge suite of automated test to try to make sure this is the case. In more than 20 years of FlexCel history, I think we can count the regressions or bugs-reintroduced with the fingers of one hand. And they are fixed as soon as we hear of them.

In this case, couldn't it be the case that you didn't had a file like this before, so that's why it didn't fail before? It this is what I think, this should have always failed, and the fact that it fails in AdvStringGridExcelIO kind of confirms it, since it means that it was already failing in FlexCel 3.

I am not sure if the problem is when importing or when exporting. If it is when importing a file like this, then it should be a problem with AdvGridExcelImport, not Export. So I assume you have "=>" in a cell of the grid, and are exporting the file. The problem here is that by default AdvStringExcelIO and AdvGridExcelExport try to convert the cells that start with "=" to a formula. And "=>" is indeed an invalid formula. If you try to enter it in Excel:

The fact that the cell has a TEXT format doesn't matter for FlexCel. If you want FlexCel to not try to convert, you can use the property:
https://doc.tmssoftware.com/grid-excel-bridge/vcl/api/UAdvGridExcelExport/TExportOptions/CellsAsStrings.html

That applies globally to all cells. If you want to apply just for some, you can use TAdvGridExcelExport.OnExportCell Event | TMS VCL Grid Excel bridge documentation