DEV Community

Cover image for How to create an excel sheet in android
Elirehema Paul
Elirehema Paul

Posted on

How to create an excel sheet in android

Worksheet simply creation of an Excel Sheets in Android project. It is simple as explained.

  • Add the dependency
        .....................................
        ..........................................

       implementation 'com.github.elirehema:worksheet:0.0.1'
  • In your activity class create excel
button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                try {
                    workSheet = new WorkSheet.Builder(getApplicationContext(), path)
                            .setSheet(List<Object>)
                            .writeSheet();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
});

Top comments (0)