I want to read excel in android from my PC share folder through SmbFile, but read nothing

134 Views Asked by At

I want to read my excel in my android app. And I use SmbFile to track the path of the file. The app worked without crash or error, but I cannot read anything.

This is my code:

            String remoteURL = "smb://xxx.20.10.3";
            String remoteFile = "/Users/peter/test.xls";
            SmbFile inputfile = new SmbFile(remoteURL + remoteFile);
            SmbFileInputStream inputStream = new SmbFileInputStream(inputfile);
            InputStream input = inputStream;
            Workbook wb = Workbook.getWorkbook(input);
            Sheet s = wb.getSheet(0);
            int row = s.getRows();
            int col = s.getColumns();

            showsite.setText(col);
0

There are 0 best solutions below