Need help in reading the ActiveX Control for checkbox & radio button components?
If you have any sample, please share the sample programs.
Reading the Excel only type is string but not components like Checkbox & radio button components:
Workbook workbook = new Workbook(new FileInputStream(“path\ v0.6.xlsx”),loadOptions);
Worksheet sheet = workbook.getWorksheets().get(1);
System.out.println(" Active cell : “+ workbook.getWorksheets().get(1).getActiveCell());
//CheckBoxCollection checks = workbook.getWorksheets().get(1).getCheckBoxes();
Cells cells = sheet.getCells();
Iterator cellIterator = cells.iterator();
Cell cell = cellIterator.next();
System.out.println((cell.getValue() != null?cell.getValue().toString() : null) +” : Cell : “+cell.getType() +” : row : "+cell.getRow() + " Column : "+cell.getColumn());
please help me in the reading the Excel ActiveXControls.
Thanks for your posting and using Aspose.Cells for Java.
We are afraid, Aspose.Cells does not support reading ActiveX Control values. However, you can acquire all of the ActiveX Control in the form of binary data. But you cannot manipulate this binary data using Aspose.Cells APIs.
To read entire ActiveX control in the binary form, you can use the Shape.getControlData() property.
However, Aspose.Cells can be used to create or manipulate Form Controls. Please see the following documentation article about Form Controls for your reference
( http://www.aspose.com/docs/display/cellsjava/Working+with+Controls )
Thanks for your replay. Could please prove the example for the getting binary detail Shape.getControlData() from Aspose.Cells.
I am using Asponse-cells-18.104.22.168.jar i don’t find any Class called Shape. Could suggest me which Api need to be used?
For example, need to read binary data from the Row 2 & Column 2 having the check box, Then how can i get the binary data from Shape.getControlData().?
Thanks in advance for your help.
I got the Shape.getControlData() in the Aspose-Cells-22.214.171.124.jar .
Shape.getControlData() : Byte how could it help me reading the value of ActiveX Control?
Thanks for your posting and considering Aspose.Cells for Java.
Shape.getControlData() method was introduced in Aspose.Cells for Java v7.7.1 so you need to use the v7.7.1 or greater to use this property.
Please see the following code. I have attached the source.xlsm used inside it for your reference.
String filePath = “F:\Shak-Data-RW\Downloads\source.xlsm”;
Workbook workbook = new Workbook(filePath);
Worksheet worksheet = workbook.getWorksheets().get(0);
Shape shape = worksheet.getShapes().get(0);
byte data = shape.getControlData();