excel文件名字,我想只有文件從FTP只獲得來自FTP的Java
擴展的.xls我做了下面的代碼:
public String[] GetFileList()
{
String ftpServerIP = Ftp_Path;
String ftpUserID = Ftp_UserName;
String ftpPassword = Ftp_Password;
FTPFile[] downloadFiles = null;
StringBuilder result = new StringBuilder();
FTPClient ftp = new FTPClient();
try {
ftp.connect("ftp://173.201.0.1/");
ftp.login(ftpUserID, ftpPassword);
downloadFiles=ftp.listFiles();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return downloadFiles;
}
只有
但它沒有返回的XLS文件。
請幫幫我。我怎麼能實現它。
我是新來的java。
我有downloadFiles的類型是FTPFile完成[] –
it..thank你 –