How can i export the values of an excel file into description of a task

Abdul
Tera Contributor

Hi,

 

We are currently using a workflow for a catalog item where in i am using a run script to fetch the values of a form which are numeric values. we have 6 such fields and in the user needs to add multiple number we have an option of adding an excel file with the numbers.

Since it is easy to access the variable values and printing them in description of the task i have done that but i would need to print the contents of the excel file in the description of the task. currently i have added the name of the attachment in the task.

Can you please let me know how to do this?

workflow.scratchpad.bu_requirements =
    (current.variables.bu_number_1 ? 'BU Number 1 / BU numéro 1: ' + current.variables.bu_number_1.getDisplayValue() + '\n' : '') +
    (current.variables.bu_number_2 ? 'BU Number 2 / BU numéro 2: ' + current.variables.bu_number_2.getDisplayValue() + '\n' : '') +
    (current.variables.bu_number_3 ? 'BU Number 3 / BU numéro 3: ' + current.variables.bu_number_3.getDisplayValue() + '\n' : '') +
    (current.variables.bu_number_4 ? 'BU Number 4 / BU numéro 4: ' + current.variables.bu_number_4.getDisplayValue() + '\n' : '') +
    (current.variables.bu_number_5 ? 'BU Number 5 / BU numéro 5: ' + current.variables.bu_number_5.getDisplayValue() + '\n' : '') +
    (current.variables.bu_number_6 ? 'BU Number 6 / BU numéro 6: ' + current.variables.bu_number_6.getDisplayValue() + '\n' : '')+
    (current.variables.attach_list_of_bu ? 'List of BU\'s that needs to be closed / Joindre la liste des UB qui doivent être fermées: ' + current.variables.attach_list_of_bu.getDisplayValue() + '\n' : '') ;
2 REPLIES 2

Mark Manders
Mega Patron

How are you processing the excel?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Ankur Bawiskar
Tera Patron
Tera Patron

@Abdul 

Sorry very difficult to understand what's your business requirement.

please share screenshots.

are you saying there are 6 attachment type variables and 6 excel files are attached and you want to read the excel file data?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader