527
Views
4
Comments
Solved
[Advanced Excel] Worksheet name
Question
advanced-excel
Service icon
Forge asset by Carlos Freitas

Hi hi,

If I select a worksheet by index using Worksheet_SelectByIndex, is it possible to assign the worksheet name to a text variable? The output of the Worksheet_SelectByIndex function is an object, and when debugging it shows the name of the workbook, but I can not seem to convert the object to a text data type, which would get me the name of the worksheet.

Any suggestions?

Thanks ahead,

Wilko

2025-09-25 22-50-38
Hanno
Solution

Hanno wrote:

Just realised that IPP might be an issue. Will see if I can update the component itself.

Wilko, I have published a new version of the component on the forge. Please download that one and use the new function.

Let me know if it worked for you and if there is something else you might need?

Hanno


2025-09-25 22-50-38
Hanno

Hi Wilko

It is not possible to convert the object to a text value. The object returned by that function is actually a very complex object but has not been defined for the extension and thus OutSystems cannot interpret the output properly.

I have attached a modified extension that will satisfy your immediate requirement. There is a function Worksheet_GetName(object) that you can use. It will return the name of the worksheet as text.

Let me know if helps :)

Hanno

Excel_Package.xif
2025-09-25 22-50-38
Hanno

Just realised that IPP might be an issue. Will see if I can update the component itself.

2025-09-25 22-50-38
Hanno
Solution

Hanno wrote:

Just realised that IPP might be an issue. Will see if I can update the component itself.

Wilko, I have published a new version of the component on the forge. Please download that one and use the new function.

Let me know if it worked for you and if there is something else you might need?

Hanno


UserImage.jpg
Wilko Odijk

Hanno hi,

Works perfect, thanks for the quick fix.

I have to make a module that reads about 25 different excel templates and performs lots of validations, which are not in a standard table layout... We are trying to make it generic, so if I come up with something, i'll let you know. 

Regards,

Wilko

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.