Could you tell me how can I load JTable from .txt or .xls file? I used the algoriithm below to save JTable content as .xls:
public void saveTable()throws Exception
{
BufferedWriter bfw = new BufferedWriter(new FileWriter("Data.xls"));
for(int i = 0 ; i < jTable1.getColumnCount() ; i++)
{
bfw.write(jTable1.getColumnName(i));
bfw.write("\t");
}
for (int i = 0 ; i < jTable1.getRowCount(); i++)
{
bfw.newLine();
for(int j = 0 ; j < jTable1.getColumnCount();j++)
{
bfw.write((String)(jTable1.getValueAt(i,j)));
bfw.write("\t");;
}
}
bfw.close();