Service portal- convert json array into excel file and download it

shalani1
Tera Contributor

Hi All,

  Can you please help me in resolving the issue on how to convert the json response into excel file and make it downloadable??

Regards,

Shalani Rajendran

 

3 REPLIES 3

Bhaba
Tera Expert

Hi Shalini,

Could you mention from where you're getting the response ?

If you've any client script written, try adding the below code.

var json= g_form.getValue('items').toString ;

var x = json.slice(1,-1);

var obt = JSON.parse(x);

for(var i = 0 ; i< obt.length ; i ++){

alert(obt[i].item_id);
}

Let me know for any queries.

 

Thanks

shalani1
Tera Contributor

Hi Bhaba, 

    Thank you for the response....The json i'm getting is through api but then issue got resolved like on click of the api the excel file is downloadable so just added that in html using ng-click function.

Akhil24
Tera Contributor

Hi Shalini,

 

I have the same kind of requirements. I have array of json, need to convert that in excel and downloadable.

 

Could you please help me in this, if you have any solution for that.

 

Thanks,

Akhil