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

Free Support Forum - aspose.com

Textboxes / Checkboxes collections populated upon Workbook.Open?

I am reading in an Excel spreadsheet with the Workbook.Open method, which has a lot of textboxes and checkboxes. However, the worksheet TextBoxes and CheckBoxes collections are coming up empty. Is this a write-only feature, or am I possibly missing something?

TIA.

Hi,

Thanks for considering Aspose.

For CheckBoxes, Aspose.Cells only supports to access and set checked/unchecked those checkboxes which are created at run time using Aspose.Cells APIs. Similarly for TextBoxes, Aspose.Cells only supports to access and manage those textboxes which are created at run time in a spreadsheet.

Since, to manage drawing objects completely in a template file, is a complex issue. We have done some workout on it. For your requirement, We will add some functionality to TextBoxes etc. For example you will be able to read text from the textboxes in your template file created in MS Excel. It takes us about 2-3 weeks to complete it.

Thanks for your patience.

Regards

Amjad Sahi

Aspose Nanjing Team

Amjad Sahi,

Thanks for your quick and helpful reply. Our main requirement is to be able to read the values inside the textbox and furthermore if possible determine what row the upper top border of the textbox resides in.

We will look forward to the update which gives read support for TextBoxes and/or CheckBoxes.

Many thank again. This forum seems to be quite excellent.

Regards,
Mike

Hi Mike,

We are working to support reading textbox value in template file. Hopefully it will be available in 1-2 weeks.

Was support for this ever added? I am unable to access existing text boxes via the TextBoxes property in a template file (xltx) in Aspose.Cells v8.1.2.0. Was this implemented some other way perhaps?

Hi,

Thanks for your posting and using Aspose.Cells.

I have checked this issue with the latest version: Aspose.Cells
for .NET v8.3.1.4
and I was able to access TextBoxes from the existing XLTX file.

I have tested this issue with the following code and also attached the source XLTX file for your reference. Please remove the .txt extension from its file name.

If your issue still occurs, then please attach your XLTX file for our investigation. We will look into it and update you asap.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\source.xltx”;


Workbook workbook = new Workbook(filePath);


Worksheet worksheet = workbook.Worksheets[0];


Debug.WriteLine("Count: " + worksheet.TextBoxes.Count);

Debug Output:
3

Thanks! I ended up trying that same version while waiting for a response.

Hi,

Thanks for your posting and using Aspose.Cells.

Is your issue resolved or you are still facing this issue? It seems to me your issue is now resolved. Please confirm. Thank you.

Yes, my issue is resolved. Thank you.