Issue with excel sheet while trying to fetch the values from groovy script

后端 未结 2 579
滥情空心
滥情空心 2021-01-26 16:08

If i place getCell(0,0) in String reqTagName = sheet1.getCell(0,0).getContents() for the below code then, it is only executing the first value from the sheet. B

2条回答
  •  一向
    一向 (楼主)
    2021-01-26 16:48

    Try these steps and let me know if it fixed the issue :

    Step 1 : Open Excel WorkBook

    Step 2 : Select the column values which holds numbers as shown in the pic below and do a right click to bring out the options

    Step 3 : Click on Format Cells and it will open a window

    Step 4 : Click on Number as shown in the pic below

    Step 5 : Go to Decimal places on the right hand side and click on the down arrow as shown in the pic below

    Step 6 : Click on the down arrow until you set the decimal places to 0

    Step 7 : Go to the Negative numbers as shown in the pic and select the second option

    Step 8 : Click on OK and close the window.

    Step 9 : Save excel sheet and run the script. You problem should be fixed

    Let me know if it worked :)

提交回复
热议问题