Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7034693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:13:01+00:00 2026-05-28T01:13:01+00:00

I am developing an application in android and I have a requirement to read

  • 0

I am developing an application in android and I have a requirement to read and write from an excel file stored in sdcard.I am using jxl library for this purpose. But I am getting some errors with file operation.

ext = Environment.getExternalStorageDirectory().getAbsolutePath()+"/hai/dynamic.xls";
setOutputFile(ext);
try {
    write();
} catch (WriteException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
} catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}
}
public void setOutputFile(String inputFile) {
    this.inputfile = inputFile;
    }

public void write() throws IOException, WriteException {
        File file = new File(inputfile);
        WorkbookSettings wbSettings = new WorkbookSettings();

        wbSettings.setLocale(new Locale("en", "EN"));

        WritableWorkbook workbook = Workbook.createWorkbook(file, wbSettings);
        workbook.createSheet("Report", 0);
        WritableSheet excelSheet = workbook.getSheet(0);
        createLabel(excelSheet);
        createContent(excelSheet);

        workbook.write();
        workbook.close();
    }

Then I am getting this following error in logcat

01-09 12:43:12.824: W/System.err(12321):     java.io.FileNotFoundException:/mnt/sdcard/hai/dynamic.xls (Permission denied)
01-09 12:43:12.884: W/System.err(12321):    at  org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
01-09 12:43:12.884: W/System.err(12321):    at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)
01-09 12:43:12.904: W/System.err(12321):    at java.io.FileOutputStream.<init>(FileOutputStream.java:94)
01-09 12:43:12.904: W/System.err(12321):    at java.io.FileOutputStream.<init>(FileOutputStream.java:66)
01-09 12:43:12.904: W/System.err(12321):    at jxl.Workbook.createWorkbook(Workbook.java:301)
01-09 12:43:12.904: W/System.err(12321):    at com.fis.excel.WriteAcivity.write(WriteAcivity.java:59)
01-09 12:43:12.904: W/System.err(12321):    at com.fis.excel.WriteAcivity.onCreate(WriteAcivity.java:40)
01-09 12:43:12.904: W/System.err(12321):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-09 12:43:12.904: W/System.err(12321):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
01-09 12:43:12.916: W/System.err(12321):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
01-09 12:43:12.916: W/System.err(12321):    at android.app.ActivityThread.access$1500(ActivityThread.java:117)
01-09 12:43:12.924: W/System.err(12321):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
01-09 12:43:12.924: W/System.err(12321):    at android.os.Handler.dispatchMessage(Handler.java:99)
01-09 12:43:12.924: W/System.err(12321):    at android.os.Looper.loop(Looper.java:123)
01-09 12:43:12.924: W/System.err(12321):    at android.app.ActivityThread.main(ActivityThread.java:3683)
01-09 12:43:12.924: W/System.err(12321):    at java.lang.reflect.Method.invokeNative(Native Method)
01-09 12:43:12.944: W/System.err(12321):    at java.lang.reflect.Method.invoke(Method.java:507)
01-09 12:43:12.944: W/System.err(12321):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-09 12:43:12.944: W/System.err(12321):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-09 12:43:12.944: W/System.err(12321):    at dalvik.system.NativeStart.main(Native Method)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:13:01+00:00Added an answer on May 28, 2026 at 1:13 am

    //add use permission in your manifest

    WRITE_EXTERNAL_STORAGE
    
    Allows an application to write to external storage
    
    
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing application using phonegap in eclipse for android .I have created folder
I have been developing Android application, and I need to read PDF-files in my
i am developing android application using Geocoder services, I have an application where I
I have been developing an Android application and testing the orientation sensor using SensorSimulator
I'm currently developing an Android application that fetches images using http requests. It would
I have been developing Android application where I use this code: Date d=new Date(new
I have been developing Android application and I can't make 1 thing - my
I have been developing Android application, and I have one question - ListView uses
I have been developing Android application which has 3 ListView and one ContextMenu for
I'm developing Android application using third party libraries (Twitter4j). I want to be able

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.