On clicking Check box in excel cell Hide\Unhide rows

Hi,

We are using Aspose to create reports in Excel 2007.

We need to add check box to some cells and on clicking of the check boxes we need to hide\Unhide some rows.

Please let me know if Aspose supports this?

Also if the same is applicable using Link Button in cell?

Regards,

Juzer

Hi,

Well, I am afraid, events handling (attaching vba codes)
regarding controls (e.g checkbox, button etc.) is not possible at the moment. We have already logged
the feature into our tracking system with an id: CELLSNET-13561. If there is any update about it, we will let you know soon.

Thank you.

Hi Amjad,

We dont want to add any macro's

Aspose provides the feature to add check box and link cells to it.

So on checking the check box cant we hide any row by Linking the row to it?

Regards,

Juzer

Hi Juzer,

Please refer to the following code. Using LinkedCell property you can link a cell where you can get the value of the checked or unchecked checkbox.
On the other hand, if you want to perform a certain task on the basis of checkbox value you have to use/ attach VBA code. This is not currently possible.

Code Snippet:
string templateFilePath = @"C:\excelTrash\CheckBox_test.xlsx";

//Instantiate a new Workbook.
Workbook excelbook = new Workbook();
//Add a checkbox to the first worksheet in the workbook.
int index = excelbook.Worksheets[0].CheckBoxes.Add(5, 5, 100, 120);
//Get the checkbox object.
Aspose.Cells.Drawing.CheckBox checkbox = excelbook.Worksheets[0].CheckBoxes[index];
//Set its text string.
checkbox.Text = "Click it!";
//Put a value into B1 cell.
excelbook.Worksheets[0].Cells["B1"].PutValue("LnkCell");
//Set B1 cell as a linked cell for the checkbox.
checkbox.LinkedCell = "B1";
//Check the checkbox by default.
checkbox.Value = true;
//Save the excel file.
excelbook.Save(templateFilePath);

Online Link for the code:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/working-with-controls.html

Thanks,

Hi,

Thanks for using Aspose.Cells.

We only plan to create,
manipulate or embed VBA codes/ macros later. We however cannot support
to run or execute macros. Does it fit your needs?