write Excel Data with poi api in Groovy script - SOAPUI 5.0.0
Hi ,
I am using poi api to read Response Data and write in Excel file - with Groovy script step.
But while declaring FileOutputStream object , getting below error.
Could some one help me.
groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.apache.poi.hssf.usermodel.HSSFWorkbook(java.io.FileOutputStream) error at line: 33
below is my code
import org.apache.poi.hssf.usermodel.*;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
//Get the Results file path
def path_O = projpath+"\\Result\\"+ "USZIPCODES" +".xls"
//Create a new workbook using POI API
srcBook = new HSSFWorkbook(new FileInputStream(new File(path_I)))
desBook = new HSSFWorkbook(new FileOutputStream(new File(path_O)));
Thanks for the update. Can you mark this post as resolved.