Hi all,
I am trying to update InputRange property of Combobox on an xlsm file, using following code:
string file = @“C:\test1.xlsm”;
Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook(file);
ComboBox comboBox = workbook.Worksheets[0].Shapes.OfType().First();
comboBox.InputRange = “$E$2:$E$3”;
workbook.Worksheets[0].AutoFitColumns();
workbook.Save(file);
However, in the output file, the InputRange is not updated.
This code could work for xls file, but not xlsm file. Did I miss something in my code?
Attached is the sample file I used.
Thanks a lot.
Hi,
Thanks for your posting and using Aspose.Cells for .NET.
I have looked into your code and I was able to replicate the problem using the latest version:
Aspose.Cells
for .NET v7.1.2.2
We have logged this issue in our database. We will look into it and get back to you asap.
This issue has been logged as CELLSNET-40497.
I have attached both the output xls and xlsm files for a reference.
Please see the code below.
C#
string filePath = @“F:\Shak-Data-RW\Downloads\test1.xlsm”;
Workbook workbook = new Workbook(filePath);
Aspose.Cells.Drawing.ComboBox comboBox = workbook.Worksheets[0].Shapes.OfType<Aspose.Cells.Drawing.ComboBox>().First();
comboBox.InputRange = “$E$2:$E$3”;
workbook.Worksheets[0].AutoFitColumns();
workbook.Save(filePath + “.out.xls”);
Hi,
In fact if you open the saved file in office 2007, InputRange is updated correctly.
There are some advanced records since office 2010. We do not support them now.
It will take us one or two weeks to support them.
The issues you have found earlier (filed as CELLSNET-40497) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.