Prob : I have a method executeunixcommand that returns filename, the executionresults(ist iteration of that method), the unixcommandresult(ist iteration of that method). Once i get all the three values i(flename, executionresults,unixcommandresult) I want to create the excel workbook(xlsx) and create a sheet with some name+count (like unix1) and add data to that sheet. below is the method for the same.
once it completes adding the data for the first iteraton in sheet1(unix1), it will go back to the method and do the second iteration, bring the three result variables(filename,executionresults,unixcommandresult) and open the sheet and add the data in the second sheet of excel.
COuld you please tell me whats wrong in this code.
public int writeresultstoexcel(string filename, AttayList<String> executionresults, ArrayList<String> unixcommandresult)
{
File parsedfile = new File(fileName);
int count=0;
if(parsedfile.exists())
{
count=count++;
XSSFSheet resultsheetname = createSheet("FID- " +count);
}
else{
createexcel(filename);
XSSFSheet resultsheetname = createSheet("FID- " +count);
}
}