Copy a worksheet with Radio Buttons Does not correctly copy

I create a second page of a worksheet with the Worksheets.AddCopy(i3) command. The page contains radio buttons. The buttons seem to copy correctly, but any of the new pages do not let you change the radio buttons selections when you have it open in Excel. The original page works fine. I basically open an XLT file, copy the worksheet with the AddCopy method and then save the file as an XLS. I am using the 4.4.3.1 version.

Hi,

We found the issue, we lost some information related radio buttons attributes when copied a sheet. We will fix it soon.

Thank you.

Hi,

Kindly try the fix (Aspose.Cells version 4.5.0.3) posted in the thread @: <A title="https://forum.aspose.com/t/88644 CTRL + Click to follow link" href="https://forum.aspose.com/t/88644</FONT></A> </P> <P>Thank you.</P>

I tried 4.5.0.3 and it still does not work. It performs the same as the previous version.

Hi,

Well, I don't find the problem,

Following is my testing code and attached is a zip file containing input .xlt and output .xls files.

Sample code:

Workbook workbook = new Workbook();
workbook.Open("d:\\test\\radioBook.xlt");
workbook.Worksheets.AddCopy(0);
workbook.Save("d:\\test\\11out1_radioBook.xls");

Please make sure that you are using the fix. If you still find the problem, could you post your template file with sample code here.

Thank you.

#region Create the workbook
Aspose.Cells.Workbook oWbk = new Aspose.Cells.Workbook();
oWbk.Open(psxltfile);

int iWorkSheets = oWbk.Worksheets.Count;
int iCurrentWorkSheet = 0;
Aspose.Cells.Worksheet oWSt = oWbk.Worksheets[iCurrentWorkSheet];

if (_XLSPages.Count == 0)
return string.Empty;

#endregion


#region Load the data
if (_XLSPages.Count > 0)
{
loadXLSHeaderData(aMap, ref oWbk);

int iPagecnt = _XLSPages.Count;
//Duplicate the pages to handle the excessive products
for (int i2 = 1; i2 < iPagecnt; i2++)
{
for (int i3 = 0; i3 < iWorkSheets; i3++)
{
oWbk.Worksheets.AddCopy(i3);
}
}
int iprow = 0;

#endregion
}
#endregion

Hi,

Thanks for considering Aspose.

Thanks for the template file.

We will figure out your issue soon.

Thank you.

Hi,

After checking the template file, we find the radio button is not a Forms object, it's a Control Toolbox. Each control box must depend on VBA codes. We do not support to copy VBA codes now.We will look into thi issue. But it could not be fixed soon.

Could you use Forms object to replace these Control Toolbox?

It did work to use the Forms object instead of the Control Toolbox, however it only allows you to have one set of radio buttons. We have multiple groups of radio buttons on a form. Do you have a solution for this?

Hi,

Thanks for considering Aspose. Yes I think you may utilize groupboxes to group radio buttons of a specified category. Please check the subtopic "Adding GroupBox Control to Group Controls in the Worksheet" in the doc: http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/working-with-controls.html

Thank you.