Skip to main content
1 de 3

Android Studio open failed erofs (read-only file system)

Este es el codigo:

AssetManager am=getAssets();// If this line gives you ERROR then try AssetManager am=getActivity().getAssets();
        InputStream is=am.open("inventario.xls");
        Workbook existingWorkbook = Workbook.getWorkbook(is);
        WritableWorkbook workbookCopy = Workbook.createWorkbook(new File("inventario.xls"), existingWorkbook);
        WritableSheet sheetToEdit = workbookCopy.getSheet(0);
        WritableCell cell;
        Label l = new Label(16,0,"Cotejar");
        cell = (WritableCell) l;
        sheetToEdit.addCell(cell);
        workbookCopy.write();
        workbookCopy.close();

        FileOutputStream fo = new FileOutputStream(new File(getFilesDir(),"inventario.xls"));
        existingWorkbook.getCell("");
        fo.close();