In some cases I get an exception "E4006: Error in formula." when using Autofilter.Add for the first fixed row of a sheet. In other cases there is no exception, but Excel shows a message when opening the file, something like "incorrect data format repaired". There are no formulas in the sheet, just a few cells with strings. My code works fine with version 5.20.32, but does not with 5.20.45/47.
Example:
Sheets[0].Pane.SplitColX := 0;
Sheets[0].Pane.SplitRowY := 1;
Sheets[0].Pane.LeftCol := 1;
Sheets[0].Pane.TopRow := 1;
Sheets[0].Pane.PaneType := ptFrozen;
Sheets[0].Autofilter.Add(0,0,10,0);
This is the debug info (read backwards):
0100e88a +08e mainisEBAs.exe XLSUtils5 1454 +10 TXLSErrorManager.Error
011cc7f3 +01b mainisEBAs.exe XLSTokenizer5 986 +3 TXLSTokenizer.TryFormula
011cb401 +011 mainisEBAs.exe XLSTokenizer5 388 +3 TXLSTokenizer.DoToken
011cb53e +0f2 mainisEBAs.exe XLSTokenizer5 471 +34 TXLSTokenizer.Parse
0121b557 +017 mainisEBAs.exe XLSFormula5 917 +2 TXLSFormulaHandler.EncodeFormula
012c7b64 +018 mainisEBAs.exe XLSNames5 270 +2 TXLSName.Compile
012c7f51 +019 mainisEBAs.exe XLSNames5 344 +5 TXLSName.SetDefinition
012c8634 +0ac mainisEBAs.exe XLSAutofilter5 81 +7 TXLSAutofilter.Add
Best regards,
Simba
Exception "Error in formula" when using Autofilter.Add
Re: Exception "Error in formula" when using Autofilter.Add
Hello
This will be fixed in the next update.
This will be fixed in the next update.
Lars Arvidsson, Axolot Data
Re: Exception "Error in formula" when using Autofilter.Add
This sounds great!