Error with validators

Hello,

i have a problem with validators in an excelfile.
If i create a list-item validator with aspose and save it. Then open it with Office-Excel an error occures.
I set the formula1 of the validation to „Yes,No“.

validation.Formula1 = @“Yes,No”;

With Aspose.Cells.dll in Version 18.10.x it worked well. Now with version 18.11 the error occures.

AsposeCells.zip (4.8 MB)

@Rossmanith,

Thanks for the sample project with details.

After an initial test, I am able to reproduce the issue as you mentioned. I found when we create a file with list data validation (using the following sample code), MS Excel gives error when opening the output file into it. We simply set the formula1 of the validation to “Yes,No”:
e.g
Sample code:

Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook();
            workbook.Worksheets.Add();
            Aspose.Cells.Worksheet worksheet = workbook.Worksheets[0];

            worksheet.Cells[0, 0].Value = "Teststring";

            Aspose.Cells.Cells cells = worksheet.Cells;
            Aspose.Cells.ValidationCollection validations = worksheet.Validations;

            Aspose.Cells.CellArea cellArea = new Aspose.Cells.CellArea();
            cellArea.StartRow = 0;
            cellArea.EndRow = 1048575;
            cellArea.StartColumn = 1;
            cellArea.EndColumn = 1;

            Aspose.Cells.Validation validation = validations[validations.Add(cellArea)];
            validation.ShowError = true;
            validation.AlertStyle = Aspose.Cells.ValidationAlertType.Stop;

            validation.Type = Aspose.Cells.ValidationType.List;
            validation.Formula1 = @"Yes,No";
            validation.ErrorTitle = "Error";

            workbook.Save("e:\\test2\\out1.xlsx", Aspose.Cells.SaveFormat.Xlsx);

            MessageBox.Show("OK");

I have logged a ticket with an id “CELLSNET-46468” for your issue. We will look into it soon.
May be your code needs a little tweak when using latest version, we will sort it out soon.

Once we have an update on it, we will let you know here.

@Rossmanith,

This is to inform you that we have fixed your issue now. We will soon provide you the fixed version after performing QA and incorporating other enhancements and fixes.

@Rossmanith,

Please try our latest version/fix: Aspose.Cells for .NET v18.11.7:

Aspose.Cells18.11.7 For .Net2_AuthenticodeSigned.Zip (4.7 MB)
Aspose.Cells18.11.7 For .Net4.0.Zip (4.7 MB)
Aspose.Cells18.11.7 For .NetStandard20.Zip (3.8 MB)

Your issue should be fixed in it.

Let us know your feedback.

Hi,

thanks for bugfixing.
It works fine.

@Rossmanith,

You are welcome.

The issues you have found earlier (filed as ) have been fixed in Aspose.Cells for .NET v18.12. This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi