• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Excel File opening

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.)
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In what format is that "data blob"? Do you know how to make sense of it?
 
sutha kavi
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Blob data is in excel format only. how can I retrieve from db?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 knew I would regret that burrito. But this tiny ad has never caused regrets:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic