Write to Excel file
Posted on 2006-05-23
I am writing a spreadsheet application, I have a save button, once it is clicked, pop-up window appears and I am trying to save the file with the content of the worksheet.
I sucesfully save the file but the file is empty, the content is not there, here is my code for save action,
Could you please help?
public void saveFile()
JFileChooser fc = new JFileChooser();
int returnVal = fc.showSaveDialog(this);
if(returnVal == JFileChooser.APPROVE_OPTION)
FileWriter fwriter = new FileWriter(fc.getSelectedFile());
BufferedWriter bwriter = new BufferedWriter(fwriter);
catch (IOException ioe)