This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Excel File opening Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Excel File opening " Watch "Excel File opening " New topic
Author

Excel File opening

jeyasutha kavi
Greenhorn

Joined: Jun 10, 2011
Posts: 2
Hi all,
I am new to this forum.I want to open an existing excel file by clicking the link.My idea is to get the binary data from database and push those data to excel file.Is it correct?
Please send me the code for this. Otherwise , if you have any idea about this, reply me with code.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41144
    
  45
I think we need some more information before we can help you. What is the "binary data" in the DB? Excel files are generally created using text, numbers and formulas - which would be text, not binary. You would use a library like Apache POI to create the actual file.

Since you posted this in the Struts forum, are you intending to stream the file to a web browser?

(By the way, nobody here will write the code for you, but we'll help you to write it.)


Ping & DNS - my free Android networking tools app
sutha kavi
Greenhorn

Joined: Jun 10, 2011
Posts: 14
I have opened new excel using apache poi.My requirement is to load the excel with data retrieved from mysql database. In DB, data is in longBLOB type.how can I retrieve that in java and push the data to excel?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41144
    
  45
In what format is that "data blob"? Do you know how to make sense of it?
sutha kavi
Greenhorn

Joined: Jun 10, 2011
Posts: 14
The Blob data is in excel format only. how can I retrieve from db?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41144
    
  45
So you have an Excel file as a BLOB in a DB, and you want to add its contents to another Excel file that are creating from scratch? Apache POI can read from any kind of stream, not just FileInputStream.

Is this somehow related to the other question you asked, where you're dealing with BLOB data that is NOT in Excel format, but which you want to add to an Excel spreadsheet?

By the way, this forum is all about Struts; does the problem have anything to do with Struts?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Excel File opening
 
Similar Threads
Export data from Jsp to Excel taking more load time
Jdbc with MS-excel
JSP-EXCEL save defualt in .xls extension, open excel with in the browser
No one is there to solve excel problem????
How to generate excel report