Cells updating Radio Buttons in different first Group Box

I am using Aspose Cells 8.4.0.

Using the below code to create three group boxes and three radio buttons in each box, changing the order of setting the values changes the results. (See below after the "AddCopy" line.)

Also, changing the order the group boxes are created changes the results. I cannot set the check value for the first group box's radio buttons. (Swap out the For TEN_COUNTER lines.)

I would like the order of events on separate functions to not affect the other functions.


Dim excelbook = New Aspose.Cells.Workbook
'For TEN_COUNTER = 3 To 1 Step -1
For TEN_COUNTER = 1 To 3
Dim box As Aspose.Cells.Drawing.GroupBox = excelbook.Worksheets(0).Shapes.AddGroupBox((TEN_COUNTER - 1) * 20 + 1, 0, 1, 0, 200, 250)
box.Shadow = False
Dim radio1 As Aspose.Cells.Drawing.RadioButton = excelbook.Worksheets(0).Shapes.AddRadioButton((TEN_COUNTER - 1) * 20 + 3, 0, 2, 0, 30, 110)
radio1.Text = TEN_COUNTER & "1"
radio1.LinkedCell = "A" & (TEN_COUNTER - 1) * 20 + 1
Dim radio2 As Aspose.Cells.Drawing.RadioButton = excelbook.Worksheets(0).Shapes.AddRadioButton((TEN_COUNTER - 1) * 20 + 6, 0, 2, 0, 30, 110)
radio2.Text = TEN_COUNTER & "2"
radio2.LinkedCell = "A" & (TEN_COUNTER - 1) * 20 + 1
Dim radio3 As Aspose.Cells.Drawing.RadioButton = excelbook.Worksheets(0).Shapes.AddRadioButton((TEN_COUNTER - 1) * 20 + 9, 0, 2, 0, 30, 110)
radio3.Text = TEN_COUNTER & "3"
radio3.LinkedCell = "A" & (TEN_COUNTER - 1) * 20 + 1
Dim shapeobjects() As Aspose.Cells.Drawing.Shape = New Aspose.Cells.Drawing.Shape() {box, radio1, radio2, radio3}
Dim group As Aspose.Cells.Drawing.GroupShape = excelbook.Worksheets(0).Shapes.Group(shapeobjects)
Next TEN_COUNTER

excelbook.Worksheets.AddCopy(0)
'excelbook.Worksheets(1).Cells(0, 0).PutValue("2")
excelbook.Worksheets(1).Cells(20, 0).PutValue("3")
excelbook.Worksheets(1).Cells(40, 0).PutValue("1")

excelbook.Worksheets(0).Cells(40, 0).PutValue("1")
excelbook.Worksheets(0).Cells(20, 0).PutValue("3")
excelbook.Worksheets(0).Cells(0, 0).PutValue("2")

excelbook.Save("C:\TEMP\Test.xlsx")

Hi Ryan,

Thanks for your posting and using Aspose.Cells.

We were able to observe this issue after executing your sample code with the latest version 8.4.0. We found that value of linked cell of radio button in the first group is wrong. It is 0 but it should be 2. Other group boxes and their linked values are correct.

We have logged this issue in our database for investigation. We will look into it and fix this issue. Once, the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as

  • CELLSNET-43494 - Value of Linked Cell of Radio Button is wrong

I have attached the output Excel file generated by your code and screenshot highlighting this issue for a reference.

VB.NET

Dim excelbook = New Aspose.Cells.Workbook

'For TEN_COUNTER = 3 To 1 Step -1

For TEN_COUNTER = 1 To 3

Dim box As Aspose.Cells.Drawing.GroupBox = excelbook.Worksheets(0).Shapes.AddGroupBox((TEN_COUNTER - 1) * 20 + 1, 0, 1, 0, 200, 250)

box.Shadow = False

Dim radio1 As Aspose.Cells.Drawing.RadioButton = excelbook.Worksheets(0).Shapes.AddRadioButton((TEN_COUNTER - 1) * 20 + 3, 0, 2, 0, 30, 110)

radio1.Text = TEN_COUNTER & “1”

radio1.LinkedCell = “A” & (TEN_COUNTER - 1) * 20 + 1

Dim radio2 As Aspose.Cells.Drawing.RadioButton = excelbook.Worksheets(0).Shapes.AddRadioButton((TEN_COUNTER - 1) * 20 + 6, 0, 2, 0, 30, 110)

radio2.Text = TEN_COUNTER & “2”

radio2.LinkedCell = “A” & (TEN_COUNTER - 1) * 20 + 1

Dim radio3 As Aspose.Cells.Drawing.RadioButton = excelbook.Worksheets(0).Shapes.AddRadioButton((TEN_COUNTER - 1) * 20 + 9, 0, 2, 0, 30, 110)

radio3.Text = TEN_COUNTER & “3”

radio3.LinkedCell = “A” & (TEN_COUNTER - 1) * 20 + 1

Dim shapeobjects() As Aspose.Cells.Drawing.Shape = New Aspose.Cells.Drawing.Shape() {box, radio1, radio2, radio3}

Dim group As Aspose.Cells.Drawing.GroupShape = excelbook.Worksheets(0).Shapes.Group(shapeobjects)

Next TEN_COUNTER


excelbook.Worksheets.AddCopy(0)

'excelbook.Worksheets(1).Cells(0, 0).PutValue(“2”)

excelbook.Worksheets(1).Cells(20, 0).PutValue(“3”)

excelbook.Worksheets(1).Cells(40, 0).PutValue(“1”)


excelbook.Worksheets(0).Cells(40, 0).PutValue(“1”)

excelbook.Worksheets(0).Cells(20, 0).PutValue(“3”)

excelbook.Worksheets(0).Cells(0, 0).PutValue(“2”)


excelbook.Save(“Test.xlsx”)



Hi,

Thanks for using Aspose.Cells.

Please download and use the latest fix: Aspose.Cells for .NET (Latest Version) and let us know your feedback.

That fix works for my purposes. Thank you.

Hi,


Thanks for your feedback.

Good to know that it figures out your issue now. Feel free to write back if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you.

The issues you have found earlier (filed as CELLSNET-43494) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.