# Writing Java script output into excel

**URL:** <https://forum.electroneek.com/t/writing-java-script-output-into-excel/543>\
**Category:** RPA Automation\
**Tags:** ocr, excel\
**Created:** [September 4, 2020, 6:44am UTC](https://forum.electroneek.com/t/writing-java-script-output-into-excel/543 "2020-09-04T06:44:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikilesh](https://forum.electroneek.com/letter_avatar_proxy/v4/letter/n/b3f665/32.png) [@Nikilesh](https://forum.electroneek.com/u/Nikilesh)\
**Post date:** [September 4, 2020, 6:44am UTC](https://forum.electroneek.com/t/writing-java-script-output-into-excel/543/1 "2020-09-04T06:44:36Z")

</div>

Hi,

I extracted Two Names from Scanned PDF document by converting into image,output which came in{“Grantor”:“Harry D. George, Jr. and Linda F. George”,“Grantee”:". Ebemart and Margaret N. Eberhart, husband"}

 ![Variable](https://community.electroneek.com/uploads/default/original/1X/b284a032265fb3038b6365e16de9ba8ecb19df34.png)

while writing into excel it shows" invalid row format" but that excel has already created with those column names.

Please help us anyone…

---

<div class="post-metadata">

**Author:** ![Nikilesh](https://forum.electroneek.com/letter_avatar_proxy/v4/letter/n/b3f665/32.png) [@Nikilesh](https://forum.electroneek.com/u/Nikilesh)\
**Post date:** [September 4, 2020, 8:07am UTC](https://forum.electroneek.com/t/writing-java-script-output-into-excel/543/2 "2020-09-04T08:07:02Z")

</div>

Hi ,

Please find below picture of script of above mentioned error.

 ![image](https://community.electroneek.com/uploads/default/original/1X/44d9dc604e6eeb53845c8cb9ab9b542b9bb1690c.png)

---

<div class="post-metadata">

**Author:** ![Nikilesh](https://forum.electroneek.com/letter_avatar_proxy/v4/letter/n/b3f665/32.png) [@Nikilesh](https://forum.electroneek.com/u/Nikilesh)\
**Post date:** [September 4, 2020, 12:06pm UTC](https://forum.electroneek.com/t/writing-java-script-output-into-excel/543/4 "2020-09-04T12:06:54Z")

</div>

Hi Tim,

Can i mention like this {“SheetName”:[{customer\_info}]}

I tried like this {“SheetName”:[{“Grantor”:“Harry D. George, Jr. and Linda F. George”,“Grantee”:". Ebemart and Margaret N. Eberhart, husband"}]} it worked.but we need use variable which has Grantor and Grantee details

---

<div class="post-metadata">

**Author:** ![Nikilesh](https://forum.electroneek.com/letter_avatar_proxy/v4/letter/n/b3f665/32.png) [@Nikilesh](https://forum.electroneek.com/u/Nikilesh)\
**Post date:** [September 4, 2020, 12:25pm UTC](https://forum.electroneek.com/t/writing-java-script-output-into-excel/543/5 "2020-09-04T12:25:42Z")

</div>

Hi Tim,

It worked.Thanks

Please check below pic

 ![image](https://community.electroneek.com/uploads/default/original/1X/b48e91e1b45aeab05c9fccf80ec0a9bf3b2a06db.png)

I’m getting Config is not defined.Please check right side calculate value in the pic.suggest me any changes i need to make.

---

<div class="post-metadata">

**Author:** ![Nikilesh](https://forum.electroneek.com/letter_avatar_proxy/v4/letter/n/b3f665/32.png) [@Nikilesh](https://forum.electroneek.com/u/Nikilesh)\
**Post date:** [September 7, 2020, 5:04am UTC](https://forum.electroneek.com/t/writing-java-script-output-into-excel/543/7 "2020-09-07T05:04:27Z")

</div>

Hi Tim,

In above mentioned picture,on right side for Variable(excel\_filepath) in calcuate a value.

Please check .
