| 1227 | |
| 1228 | |
| 1229 | protected void writeTSV(PrintWriter writer) { |
| 1230 | if (columnTitles != null) { |
| 1231 | for (int col = 0; col < columns.length; col++) { |
| 1232 | if (col != 0) { |
| 1233 | writer.print('\t'); |
| 1234 | } |
| 1235 | if (columnTitles[col] != null) { |
| 1236 | writer.print(columnTitles[col]); |
| 1237 | } |
| 1238 | } |
| 1239 | writer.println(); |
| 1240 | } |
| 1241 | for (int row = 0; row < rowCount; row++) { |
| 1242 | for (int col = 0; col < getColumnCount(); col++) { |
| 1243 | if (col != 0) { |
| 1244 | writer.print('\t'); |
| 1245 | } |
| 1246 | String entry = getString(row, col); |
| 1247 | // just write null entries as blanks, rather than spewing 'null' |
| 1248 | // all over the spreadsheet file. |
| 1249 | if (entry != null) { |
| 1250 | writer.print(entry); |
| 1251 | } |
| 1252 | } |
| 1253 | writer.println(); |
| 1254 | } |
| 1255 | writer.flush(); |
| 1256 | } |
| 1257 | |
| 1258 | |
| 1259 | protected void writeCSV(PrintWriter writer) { |