We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Radiobutton: Linked cell wrong in code and real file

Hello Aspose team,

I have a Excel file, in the first sheet it have 10 Radio buttons.
I detected that 4 first radio linked to “Z5” cell, and 6 other linked to “Z4”.

First problem is: When i debug, i found only 1 Radio link to Z4 and 9 other link to Z5?
Second problem is: When i put value direct by coding to Z4, Z5 cell it not work at all.
When debug Z4 value: 6
Z5 value: 4
But when i save it to disk and open Z5 value: 0

I don’t know why?
Please help me in this problem.

Thank you so much!
NQMinh.

Hi,


Thanks for the template file and details.

Please try our latest version/fix: Aspose.Cells for Java v17.1.4
I have tested your scenario/ case using the following sample code with your template file using v17.1.4, it works as expected.
e.g
Sample code:

Workbook workbook = new Workbook(“e:\test2\HoSo_THCS_T12.xls”);
Worksheet worksheet = workbook.Worksheets[“Truong”];
Aspose.Cells.Drawing.RadioButton radio = null;

foreach (Shape item in worksheet.Shapes)
{
if (item.GetType().ToString() == “Aspose.Cells.Drawing.RadioButton”)
{

radio = (Aspose.Cells.Drawing.RadioButton)item;
Console.WriteLine(“RadioButton: " + radio.Name + " Linked Cell:” + radio.LinkedCell);

}
}

worksheet.Cells[“Z5”].PutValue(1);
worksheet.Shapes.UpdateSelectedValue();



workbook.Save(“e:\test2\out1.xls”);

Hope, this helps a bit.

Thank you.