Révision 2364
| tmp/org.txm.libs.msoffice/src/org/txm/libs/msoffice/ReadExcel.java (revision 2364) | ||
|---|---|---|
| 438 | 438 |
|
| 439 | 439 |
HashMap<String, String> lineRules = new HashMap<String, String>(); // line tests to select line to keep |
| 440 | 440 |
List<String> columnsSelection; // lsit of columns to keep |
| 441 |
|
|
| 442 |
|
|
| 441 |
HashMap<String, String> columnsToCopy = new HashMap<String, String>(); |
|
| 442 |
HashMap<String, String> columnsToRenameRules = new HashMap<String, String>(); |
|
| 443 |
HashMap<String, String[]> searchAndReplaceRules = new HashMap<String, String[]>(); |
|
| 443 | 444 |
// //emissions |
| 444 | 445 |
// table2File = new File("/home/mdecorde/TEMP/ANTRACT/AF/emissions.xlsx");
|
| 445 | 446 |
// columnsSelection = Arrays.asList( |
| 446 | 447 |
// "Identifiant de la notice", "Titre propre", "Notes du titre", "Date de diffusion", "Durée", "Nom fichier segmenté (info)", "antract_video", |
| 447 | 448 |
// "antract_debut","antract_fin","antract_duree","antract_tc_type","antract_tc_date"); |
| 448 | 449 |
// lineRules.put("Type de notice", "Notice sommaire");
|
| 450 |
// columnsToCopy.put("Notes du titre", "subtitle");
|
|
| 451 |
// columnsToCopy.put("Titre propre", "title");
|
|
| 452 |
// columnsToCopy.put("Date de diffusion", "textorder");
|
|
| 453 |
// columnsToRenameRules.put("Identifiant de la notice", "id");
|
|
| 454 |
// searchAndReplaceRules.put("textorder", new String[] {"../../....", "$3$2$1"});
|
|
| 449 | 455 |
|
| 450 | 456 |
//sujets |
| 451 | 457 |
table2File = new File("/home/mdecorde/TEMP/ANTRACT/AF/sujets.xlsx");
|
| ... | ... | |
| 464 | 470 |
return; |
| 465 | 471 |
} |
| 466 | 472 |
|
| 467 |
System.out.println("renaming column...");
|
|
| 468 |
HashMap<String, String> rules = new HashMap<String, String>(); |
|
| 469 |
rules.put("Identifiant de la notice", "id");
|
|
| 470 |
excel2.renameColumns(rules); |
|
| 473 |
System.out.println("copying column: "+columnsToCopy.size());
|
|
| 474 |
//excel2.copyColumns(columnsToCopy); |
|
| 471 | 475 |
|
| 476 |
System.out.println("search&replace column: "+searchAndReplaceRules.size());
|
|
| 477 |
//excel2.searchAndReplaceInLines(searchAndReplaceRules); |
|
| 478 |
|
|
| 479 |
System.out.println("renaming column: "+columnsToRenameRules.size());
|
|
| 480 |
excel2.renameColumns(columnsToRenameRules); |
|
| 481 |
|
|
| 472 | 482 |
System.out.println("saving&closing...");
|
| 473 | 483 |
excel2.save(); |
| 474 | 484 |
excel2.close(); |
Formats disponibles : Unified diff