How to create an Excel file from your Android App?

preview_player
Показать описание


It hard-codes the file name and sheet name in the code. However, that can be taken as an input from the user.

For the content it takes the input from the user through an Edit Text widget. Though it uses a single line edit text but same can be done using a multi-line plain text (Edit text) user input.

It creates the file in the emulator's external storage. However, any location on the mobile device can be used to create the file.

Complete source code and other details can be found in the below link:

However, the main Java code is copied below also for reference:

import android.Manifest;

public class MainActivity extends AppCompatActivity {

private EditText editTextExcel;

@Override
protected void onCreate(Bundle savedInstanceState) {

}

public void buttonCreateExcel(View view){
HSSFWorkbook hssfWorkbook = new HSSFWorkbook();

try {
}

FileOutputStream fileOutputStream= new FileOutputStream(filePath);

if (fileOutputStream!=null){
}
} catch (Exception e) {
}
}
}
Рекомендации по теме
Комментарии
Автор

Thanks a lot sir. Was searching for a lot of time still couldn't figure it out so far. Ur vid did the work, helped a lot in my project ✨

shakthis
Автор

Amazing video. It is very short and it goes straight to the point. Thank you so much!

diasflacleo
Автор

Thanks a lot sir.
I got stuck how to connect to excel, but by watching this video, I am now able to connect my data in Excel sheet. Thanks a lot man for posting such a great video 🙏🙏

abhidnyanjadhav
Автор

Very interesting tutorail indeed, thanks for sharing. You could also make a part 2 or 3 of this tutorial, by making some more adjustments to the Excel file, like creating a list or a table inside that excel file, or even some functions, that would be awesome. Good work!

jsepol
Автор

Thank you for this vid, but do you have a vid on how to add rows dynimcally?

Nbak-cwjx
Автор

Could you design a Hearing Aid System by inverting signals A/D and D/A or using one algorithm. For example: A mic or any audio signal with noise as input, then using algorithm to impalement a clear output signal

mohammedal_gunaid
Автор

How can we save recycler view data into Excel sheet
Plzz help me

anshmouryaa
Автор

Hi Sir, I tried HSSFWorkbook but It only limited to 255 rows and columns, can you please advise how to increase their limit or how to use XSSFWorkbook, When I tried XSSFWorkbook it giving an error. Please suggest

computereducationwithanil
Автор

Great sir may tou plz, give video for excel to sqlite import in android. Plz I have to implement it on my final year project . I tried but did not find any working solution.
Thanks.

aijazali
Автор

This code is applicable for data in list view to excel?

Mahi_Pandya
Автор

hello, how to change folder name and file name base in the user's input?

elbaka
Автор

but if we add new name in app it stores the name to the first name instead of using another row, and the first name hides is there any solution????

hassanzulfiqar
Автор

sir hum array ki value kaise print krwayenge means multipledata

deepakmajoka
Автор

Hello Sir,
It is creating a new file everytime I am opening the app.
Is there any way to store this file as permanent and data keep on appending everytime I write something in it??
Please help

amoghjain
Автор

Can you please make a Android app to track steps on START button click and display total distance, avg speed and time after clicking STOP ?

abhishekr.
Автор

How to add multiple row of data add on single click (ex. set of id, name, mobilenumber)

easwaranv
Автор

sir i want to upload an image too but i am unable to do that please solve my problem its very urgent please sir

LoFiLoverZ
Автор

if we are using our android device what will be the location of the spreadsheet

ravitripathi
Автор

Can u guide me how to create xlsx file ??

tgdesihiphopraps
Автор

Doesn't work for Android 11, how do I fix please?

terencesajere
welcome to shbcf.ru