*
The moose likes JDBC and the fly likes Write Data to Excel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Write Data to Excel" Watch "Write Data to Excel" New topic
Author

Write Data to Excel

Kedarnath Bhagwat
Greenhorn

Joined: Oct 27, 2009
Posts: 20
Can somebody help me with a code to write to multiple columns of Excel .
I am not using any API and don't want to use any .

I conneceted using DSN .
I am able to succesfully retrieve data but when I write I can write to only one column.
If I write insert into statement with multiple values I get error.
I use executeUpdate to write data

Can somebody help ?
Please let me know if you need more information.


kmbhagwat , SCJP 6
Vivek Singh
Ranch Hand

Joined: Oct 27, 2009
Posts: 92
Do you want to export the excel data to a database??

This is very possible i had similar case where i had to export the excel data which had X,Y columns and rows. But i needed some specific Cells.
Vivek Singh
Ranch Hand

Joined: Oct 27, 2009
Posts: 92
Vice-versa is quite possible..
Kedarnath Bhagwat
Greenhorn

Joined: Oct 27, 2009
Posts: 20
I am using Excel as output file or you can say as a database .

I fetched data from Excel using DSN , processed it, and now I want to write output to same Excel in another sheet .

I use executeUpdate to post the data through insert statement .

But the error is related to not matching destination columns with no of columns I have .

I tried adding columns to Excel so that both will match , but it didn't work.

Please send me any example if you have .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Write Data to Excel
 
Similar Threads
java program for pdf file to excel file conversion
How to read from an excel sheet in linux?
Reading and Writing from Excel Spreadsheet
how to apped standard Font to HSSFWorkbook
Jasper Report Help Required