I am writing my variables to a CSV file but I am facing these 2 issues- 1. Even if the script finishes, the CSV file displays it is in use and read only mode 2. I want to have tab separated values but \t in following does not work
FileWriter fstream = new FileWriter("C:\\path to csv\\test.csv",true);
BufferedWriter out = new BufferedWriter(fstream);
out.write(vars.get("num1"));
out.write(System.getProperty("\t"));
out.write(vars.get("num2"));
out.write(System.getProperty("line.separator"));
out.close();
fstream.close();
What do I do to fix them?