Cannot get text from embedded textbox - asponse.cells thinks it's a picture!

We have some legacy data stored in Excel files.
The data we need to access is within a textbox on one of the worksheets in the workbook.

I can open the workbook and get to the worksheet, but I cannot get to the contents of the textbox.

Aspose.Cells can see the object (called 'txAllData'), but it thinks it's underlying type is a picture.

I cannot cast it as this raises an exception, so how can I access this textbox to get the data out?

I've attached an example sheet used for testing.

Sample code:

Worksheet wsSettings = workbook.Worksheets["Settings"];
foreach (Shape shape in wsSettings.Shapes)
{
if (shape.Name == "txAllData")
{
TextBox txtBox = null;
txtBox = (TextBox)shape;
if (shape.Text != "")
{
// here's our data?
}
}
}

Hi,

It appears to me a bug. The underlying type should be a textbox but it turns out to be a picture. We will look into it and fix it asap.

This issue has been logged as CELLSNET-30783.

Hi,


Well, it looks the control you are using is an ActiveX control and we only preserve it as it is in XLS/XLSX files, we don’t support to manipulate it (get / set its properties). I think you for the time being may use Label or some other Form Control using Aspose.Cells. Please see the following documentation link for details of different controls supported by Aspose.Cells:<o:p></o:p>

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

<o:p>
</o:p>

<o:p>As Shakeel Faiz has already added your feature request with an id: 30783, so we will also look into it.</o:p>

<o:p>
</o:p>

<o:p>
thank you. </o:p>

Thanks for the updates.

As per the original post, unfortunately we are unable to use other types as these files already exist out "in the wild" so we have to recover the data from them somehow.

I look forward to a fix as it would push Aspose beyond the competition.