1

import data from excel to database using java, i find "Apachi POI" .

But now, i want to import data from database to excel using java. May i use for this "Apachi POI" too? if no, what i must do? thanks

1

3 Answers 3

1

yes. poi can write excel file.

or you can read the data from DB, then generate a CSV file (without poi). In most case, MS-Excel can open CSV format.

but if you need your Excel file to have a sexy looking.. e.g. colorful font, bgcolor. etc.. try poi.

Sign up to request clarification or add additional context in comments.

Comments

1

Yes you can use Apache POI to import data into excel from database. But the easiest way is to download as CSV file. The difference is with CSV file you cannot format the cells but with excel you can format cells as you wish. E.G)Like cell border, cell highlight, fonts these things can be done only if excel download is used. If you no need formatting then you can choose the simplest way CSV download.

Comments

0

I don't know if you can use Apachi POI to import data from database to excel but you can format your database's data as csv file and import this csv into excel (excel can import it natively)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.