View | Details | Raw Unified | Return to bug 58347
Collapse All | Expand All

(-)src/java/org/apache/poi/hssf/dev/ReSave.java (-5 / +5 lines)
Lines 33-43 Link Here
33
public class ReSave {
33
public class ReSave {
34
    public static void main(String[] args) throws Exception {
34
    public static void main(String[] args) throws Exception {
35
        boolean initDrawing = false;
35
        boolean initDrawing = false;
36
        for(String arg : args) {
36
        for(String filename : args) {
37
            if(arg.equals("-dg")) initDrawing = true;
37
            if(filename.equals("-dg")) initDrawing = true;
38
            else {
38
            else {
39
                System.out.print("reading " + arg + "...");
39
                System.out.print("reading " + filename + "...");
40
                FileInputStream is = new FileInputStream(arg);
40
                FileInputStream is = new FileInputStream(filename);
41
                HSSFWorkbook wb = new HSSFWorkbook(is);
41
                HSSFWorkbook wb = new HSSFWorkbook(is);
42
                try {
42
                try {
43
                    System.out.println("done");
43
                    System.out.println("done");
Lines 49-55 Link Here
49
                        }
49
                        }
50
                    }
50
                    }
51
    
51
    
52
                    String outputFile = arg.replace(".xls", "-saved.xls");
52
                    final String outputFile = filename.replace(".xls", "-saved.xls");
53
                    System.out.print("saving to " + outputFile + "...");
53
                    System.out.print("saving to " + outputFile + "...");
54
                    FileOutputStream out = new FileOutputStream(outputFile);
54
                    FileOutputStream out = new FileOutputStream(outputFile);
55
                    try {
55
                    try {

Return to bug 58347