读取当前路径,列出xls文件

import java.io.File;


public class GetCurrentDirectory {

	public String GetDirectory()
	{
		File directory = new File("");
		return directory.getAbsolutePath();
	}
}

  

GetCurrentDirectory gcd = new GetCurrentDirectory();
String strLuJing = gcd.GetDirectory();

File f = new File(strLuJing);
ListXls lx = new ListXls();
lx.print(f);

  

posted @ 2016-12-31 17:25  cdsj  阅读(216)  评论(0编辑  收藏  举报