View Javadoc

1   /*
2    * 
3    * 
4    */
5   package oscon2006.common;
6   
7   import com.healthmarketscience.jackcess.*;
8   import org.apache.poi.hssf.*;
9   import org.apache.poi.hssf.usermodel.*;
10  import java.io.*;
11  import java.util.*;
12  import java.sql.*;
13  
14  public class mdb2xls
15  {
16  	public static void main(String[] args) throws Exception
17  	{
18  		if (args.length != 1)
19  		{
20  			exit("Sorry.");
21  		}
22  		
23  		File mdbFile = new File(args[0]);
24  
25  		if ( ! mdbFile.canRead())
26  		{
27  			exit("Can't read file: " +  mdbFile.toString());
28  		}
29  	
30  		Util.createExcelFile(mdbFile, "output.xls");
31  
32  		System.exit(0);
33  	}
34  
35  	private static void exit(String message)
36  	{
37  		System.err.println(message);
38  		System.exit(1);
39  	}
40  }