我正在尝试使用以下代码从http://udios.site88.net/Lunch.xls使用 Jexcel API 加载 xls 文件:
URL url = new URL("http://udios.site88.net/Lunch.xls");
InputStream in = url.openStream();
Workbook workBook = null;
workBook = Workbook.getWorkbook(in);
Sheet sheet = workBook.getSheet(0);
Cell cell;
cell = sheet.getCell(21, 1);
Toast.makeText(MainActivity.this, cell.getContents(), Toast.LENGTH_LONG*3).show();
但它会引发以下异常:
java.net.UnknownHostException: udios.site88.net 这发生在:InputStream in = url.openStream();
任何人都可以帮助我吗?谢谢