Hello,
I'm using Delphi 2007 and XLSReadWriteII 5.20.46.
If I insert text '_x3hhM_' into a cell, the xlsx file is created incorrectly. Excel 2007 (and 2010) displayes an error saying that the file was corrupted.
Hi!
I have a similar problem with excel 2013 when i add a string like "test_xflat_test.txt" to an excel file (leads to a corrupt excel file) and solved the problem with a simple regex.
The main problem is that excel encodes strings with "_x + Hex value + _" (and only these strings!),but XLS ReadWrite also changes strings like _x3hhM_ which is not a hex value.
Thanks for your fix. Unfortunately your solution without regex seems to be wrong (50.20.48). Our xlsx unit tests fail since
strings like "test_x1001_test" is not escaped to "test_x005F_x1001_test" like expected.
Unfotunately still problems with some values which needs more than one value to escape like:
test_x1111__xfabc_ which should be escaped two times -> test_x0005F_x1111_x0005F_xfabc_ but this is not done.
If there is no easy fix without a regex, maybe you could use the regex solution with {$if CompilerVersion > 14} (= Delphi 6).
I think this will cover the most cases.