[Advanced Excel] Worksheet name

[Advanced Excel] Worksheet name

  
Forge Component
(33)
Published on 9 Apr (11 days ago) by Hanno
33 votes
Published on 9 Apr (11 days ago) by Hanno

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

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

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

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


Solution

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