Forum Discussion
I have used your code only and done some R&D finally i got your expected result here belowo is code.
import jxl.*;
import jxl.write.*
Workbook workbook = Workbook.getWorkbook(new File("d:\\NewExcel.xls"));
WritableWorkbook copy = Workbook.createWorkbook(new File("d:\\NewExcel.xls"),workbook);
Sheet sheet1 = copy.getSheet("Sheet4");
WritableSheet sheet2 = copy.getSheet("Sheet1");
CL = 0;
rows = sheet1.getRows();
for( tc_row in 1..rows-1){
WritableCell tmpA = sheet1.getCell(CL,tc_row);
String s1 = tmpA.getContents();
log.info("$s1")
Label label = new Label(CL,tc_row,s1);
sheet2.addCell(label);
}
copy.write();
copy.close();
workbook.close();
I have also one query plz help me out in that...
Regards,
Sandeep S S
Hello,
I know this thread is old but hopefully I can get some answers. I am trying to do the same, get data from an excel file and write more data onto the same Excel file but in a different row. I tried to use DataSink but it only writes it into a new Excel Tab page.
Is there a way I can write the results on the same excel file but on different columns,
Thanks
- mani18 years agoOccasional Contributor
Hi
I am having the same requirement.
I want to update the soap response into existing excel file with specific row and column, I tried, but Not get the result yet.
I am able to save the response into new excel sheet,
Can anyone help me on this, I am new to this groovy script.
Thanks & Regards,
Murugan Chelliah
- Don8 years agoContributor
Hello mani1.
I'm not sure I understand your question.
So you get a response from the API and you want to update the response into an excel file? So you get the API response, and insert it into a specific row and column and when you run the test again you want to over write the response from before?
- mani17 years agoOccasional Contributor
Hello Don,
Thanks for your response, Yes, I am getting the response from API and I want to update the response content in to an existing excel file in to a specific cell (row, column) and it shouldn't delete any existing cell value (row, column) from that excel.
I am able to update the response in to new excel file, which I don't want.
Please help me to solve this, it would be fine if any sample code with example, will be very helpful
Thanks & Regards,
Murugan Chelliah
Related Content
Recent Discussions
- 12 hours agoKLWallace
- 7 days agoruchisingh