Hi!
At some point in the past, I believe Spreadsheet enforced a rule (as Excel does) that a single string in a formula can't be more than 255 characters
Now that DevExpress (18 or 19 both seem to allow it) doesn't validate, I get an error exporting to Excel and opening " We found a problem with some content in "spreadsheet name""
So any formula with
="A string longer than 255 characters"
no problem in DevExpress, but Excel will complain (non-descriptively, so in large xlsx files it's hard to pick up)
Is this a bug? Or do I need to add data validation in myself somewhere
Trent
It's possible to create a formula with a text value longer than 255 characters
Answers approved by DevExpress Support
We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.
Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.
Hello.
I needed to store a long path in the string parameter (in my case, the parents of a tree element separated by '') in my UDF function, so I could exceed 255 characters.
A working solution is to divide the entire string into 255-character sections and combine it with & as follows.
C#=MyFunc("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"&"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"&"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB\CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"&"CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC")
Maybe it will be useful to someone.
Functions
C#public static string FormulaSplitLongParameter(string path)
{
if (path.Length > 255)
return string.Format("\"{0}\"", string.Join("\"&\"", path.Split(255)));
else
return string.Format("\"{0}\"", path);
}
C#public static IEnumerable<string> Split(this string value, int size)
{
return value.Select((x, i) => i).Where(i => i % size == 0).Select(i => string.Concat(value.Skip(i).Take(size)));
}
Hello Trent,
Thank you for pointing this out. You are correct. Text values specified in formulas should be also limited to 255 characters in SpreadsheetControl. However, the in-place cell editor allows inserting a longer string in a formula, and Spreadsheet doesn't show any warning on submitting such a formula.
I've forwarded this issue to our developers for further processing. Please follow our updates.
Thanks Mariya,
As an aside, is there an estimated timeframe for 19.1.5? There's two other bugs fixed that are currently hotfixed and we're not big on using the hotfixes when we can avoid it
Hello Trent,
I cannot say the precise date of the next minor release. However, you can expect version 19.1.5 to be released in the end of this month or in early August.
That's great thanks Mariya!