Writing a JTable to a tab delimited file
Most of the issues with this code are stylistic and violations of Java conventions rather than functional.

public class excel {


Class names should always be capitalized (e.g., public class Excel).  Your class should probably also be named more descriptively and appropriately.  Your class isn't Microsoft Excel.  It's a class which converts JTable data into a CSV.  So it would make more sense to name your class JTableConverter or something like that.

String columnNames[] = { "Column 1", "Column 2", "Column 3" };


Class fields should always have an explicit access modifier (public, private, or protected).  Generally, if they're constants (as you use them), they are either public static final or private static final with the name in ALL_CAPS_WITH_UNDERSCORES.  For an understanding of static, you can see this StackOverflow Q&amp;A.

So... private static final String[] COLUMN_NAMES = { "Column 1", "Column 2", "Column 3" };

excel() {
    table = new JTable( dataValues, columnNames );
}


Constructors and methods should also have an explicit access modifier.  (public JTableConverter())

public void toExcel(JTable table, File file) {


Method names should generally be verbs or verb phrases (such as convertToExcel).  Also, since you're passing in the JTable to be used, it would make more sense for this to be a static method rather than an instance method.  If you want it to be an appropriate instance method, there's no need to pass in the JTable at all, since the instance will already have access to the JTable table field.

excel.close();


Releasing or closing resources should pretty much always be done in a finally block, which is guaranteed* to run.  i.e.,

FileWriter writer = new FileWriter(file);
try {
    //stuff
}
catch(IOException ioe) {
    //handling
}
finally {
    try {
        writer.flush();
        writer.close();
    }
    catch(IOException ioe) {
        //handling
    }
}


And, finally ...

public static void main(String[] o) {
    excel cv = new excel();
    cv.toExcel(cv.table,new File("H:\\cs.tbv"));
}


It's a bit nitpicky, but it's usually better to have your main method in a separate driver class (like JTableConverterDriver).