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

Free Support Forum - aspose.com

How to hide groupbox border when radio button grouped and how to restrict user to add or delete rows and column

How to hide groupbox border when radio button grouped, and how to restrict user to add or delete rows and column in excel sheet.
below is my code

if (Directory.Exists(root))
{
foreach (FileInfo file in di.GetFiles())
{
file.Delete();
}
// Directory.Delete(root);
}

        Workbook excelbook = new Workbook();
        excelbook.Worksheets[0].IsGridlinesVisible = false;
        excelbook.Worksheets[0].Protection.AllowDeletingRow = false;
        excelbook.Worksheets[0].Protection.AllowDeletingColumn = false;
        excelbook.Worksheets[0].Protection.AllowInsertingColumn = false;
        excelbook.Worksheets[0].Protection.AllowInsertingRow = false;
        // Worksheet objtempworksheet = null;
        int row = 1;
        for (int ques = 1; ques <= 2; ques++)
        {

            //}
            
                Aspose.Cells.Drawing.GroupBox box = excelbook.Worksheets[0].Shapes.AddGroupBox(row, 0, 1, 0, 100, 250);
            
            box.Name = "Example";
            //box.HasLine.
            int j = 1;
            
            List<RadioButton> listradio = new List<RadioButton>();
            for (int i = 1; i <= 3; i++)
            {
                listradio.Add(excelbook.Worksheets[0].Shapes.AddRadioButton(row, 0, 1, 0, 30, 110));
                row++;
            }
            row++;row++; row++; row++;


            Aspose.Cells.Drawing.Shape[] shapeobjects = new Aspose.Cells.Drawing.Shape[4];
            shapeobjects[0] = box;
            //int i = 1;
            foreach (RadioButton item in listradio)
            {
                shapeobjects[j] = item;
                j++;
            }
            Aspose.Cells.Drawing.GroupShape group = excelbook.Worksheets[0].Shapes.Group(shapeobjects);
        }
        excelbook.Save("D:\\New folder\\" + "book1.xls");

@kiranmurkal,

Thanks for the sample code segment and details.

Please try the updated sample code, it will work for your requirements as I tested:
e.g
Sample code:

.......
 Workbook excelbook = new Workbook();
        excelbook.Worksheets[0].IsGridlinesVisible = false;
        // Restricting users to edit contents of the worksheet
        excelbook.Worksheets[0].Protection.AllowEditingContent = false;
        // Restricting users to edit objects of the worksheet
        excelbook.Worksheets[0].Protection.AllowEditingObject = false;
        // Restricting users to edit scenarios of the worksheet
        excelbook.Worksheets[0].Protection.AllowEditingScenario = false;
        excelbook.Worksheets[0].Protection.AllowDeletingRow = false;
        excelbook.Worksheets[0].Protection.AllowDeletingColumn = false;
        excelbook.Worksheets[0].Protection.AllowInsertingColumn = false;
        excelbook.Worksheets[0].Protection.AllowInsertingRow = false;
        // Worksheet objtempworksheet = null;
        int row = 1;
        for (int ques = 1; ques <= 2; ques++)
        {

            //}
            
                Aspose.Cells.Drawing.GroupBox box = excelbook.Worksheets[0].Shapes.AddGroupBox(row, 0, 1, 0, 100, 250);
            
            box.Name = "Example";
            //box.HasLine.
            box.IsHidden = true;
            int j = 1;
            

            List<Aspose.Cells.Drawing.RadioButton> listradio = new List<Aspose.Cells.Drawing.RadioButton>();
            for (int i = 1; i <= 3; i++)
            {
                listradio.Add(excelbook.Worksheets[0].Shapes.AddRadioButton(row, 0, 1, 0, 30, 110));
                row++;
            }
            row++;row++; row++; row++;


            Aspose.Cells.Drawing.Shape[] shapeobjects = new Aspose.Cells.Drawing.Shape[4];
            shapeobjects[0] = box;
            //int i = 1;
            foreach (Aspose.Cells.Drawing.RadioButton item in listradio)
            {
                shapeobjects[j] = item;
                j++;
            }
            Aspose.Cells.Drawing.GroupShape group = excelbook.Worksheets[0].Shapes.Group(shapeobjects);
        }
        excelbook.Save("e:\\test2\\book.xls");

Hope, this helps a bit.