0

I am developing an android application where I need to pass some records to .xls or .xlsx file. I did everything to pass values from my java class to excel sheet in android. But when I run the application I am getting this error

/test.xlsx: open failed: EROFS (Read-only file system)

I even gave permission in manifest file

 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

Can you help me how to resolve this problem.

  • 2
    Because **you can't access the root** directory (/). – Phantômaxx Mar 12 '15 at 12:33
  • @DerGolem then how to access root directory? – Naresh Kumar Koppera Mar 12 '15 at 12:33
  • 1
    **You can't access the root directory**. Use `Environment.getExternalStorageDirectory()` to access the internal storage or the sd card. By the way, this permission**WRITE_EXTERNAL_STORAGE** also implicitly includes this one **READ_EXTERNAL_STORAGE**. So, you don't need to specify both. – Phantômaxx Mar 12 '15 at 12:34

0 Answers0