I’m trying to load xls file with Jexcel API from http://udios.site88.net/Lunch.xls with this code:
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();
But it throws the following Exception:
java.net.UnknownHostException: udios.site88.net
this happens in:
InputStream in = url.openStream();
can anyone help me with that? thanks
You need to set
<uses-permission android:name="android.permission.INTERNET" />in yourAndroidManifest.xmland make sure that you have internet connection on your device.EDIT: as I try to access the URL in the browser, it seems that this address is blocked due to a Malware.