• 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

spredsheet should disply the dynamic data

 
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
may i know how to display some content in Excel sheet from JSP or property file while excel sheet is populated with the date from java code.

what is happening now:

excel sheet opens up onclick of download button
and spredsheet is created from Java code with the logic implemented in java itself and populated with the date implemented by java code.
now i want to add some note at the end of the file that can be changed at any time.
may i know is there any solutution for this.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well this certainly isn't a JSP question. I've moved ti somewhere more appropriate. What API are you using to create the spreadsheet?
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Well this certainly isn't a JSP question. I've moved ti somewhere more appropriate. What API are you using to create the spreadsheet?



Servlet APIs like HTTPServletResponse, servletoutput stream.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You mean you're not using a library like jExcelApi or Apache POI? If so, is it really an Excel file that you're creating? Or an HTML or CSV file that happens to be opened by Excel?

Either way, what does "add some note at the end of the file that can be changed at any time" mean? What is "some note" - text in a cell? And who would be changing it - a human being? Code running on the client or the server?

You need to TellTheDetails.
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:You mean you're not using a library like jExcelApi or Apache POI? If so, is it really an Excel file that you're creating? Or an HTML or CSV file that happens to be opened by Excel?

Either way, what does "add some note at the end of the file that can be changed at any time" mean? What is "some note" - text in a cell? And who would be changing it - a human being? Code running on the client or the server?

You need to TellTheDetails.



well very good question

yes, It is CSV file being created that happes to be opened by excel

2/ a note need to be added by humanbeing at runtime in that CSV file(A text cell), in other words recompilasation, deployment of the application need to avoided.

many thanks in advance.
 
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
Well, if you manage to have the CSV file be opened by Excel on the client, then the user would have no problem using any of Excel's functionality (including adding any text in any cell she chooses). it won't get saved in any way, of course, unless she saves it locally. Is that what you mean by "add some note at the end of the file that can be changed at any time"?
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:Well, if you manage to have the CSV file be opened by Excel on the client, then the user would have no problem using any of Excel's functionality (including adding any text in any cell she chooses). it won't get saved in any way, of course, unless she saves it locally. Is that what you mean by "add some note at the end of the file that can be changed at any time"?




No No, As a programmer i want to add some text note in Excel sheet and that can be changed by business/web desigers as they want. client have no idea what the information he is going to get.


only business wants to add note to the excel sheet.
 
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
I still can't tell whether this changing/adding of values would happen programmatically on the server or manually on the client? If the former, there should be no problem to stream the values the next time the CSV is accessed, no? If the latter, the values wouldn't be saved unless you somehow upload/save them to the server.
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:I still can't tell whether this changing/adding of values would happen programmatically on the server or manually on the client? If the former, there should be no problem to stream the values the next time the CSV is accessed, no? If the latter, the values wouldn't be saved unless you somehow upload/save them to the server.




I want my controller to get the data from property file or jsp file to and show it in excel sheet. if i use property file i can display as i want so i want to useJSP. is there any solution?
 
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

I want my controller to get the data from property file or jsp file to and show it in excel sheet.


Firstly, please drop the references to "Excel sheet". If you create CSV, then that's what you have - CSV, which is not an Excel file. It doesn't matter what application is used on the client side to open it.
Also, what does "get the data from JSP file" mean? JSPs are used for generating character data (like HTML or CSV) - they are not a *source* of data.

if i use property file i can display as i want so i want to useJSP.


I don't understand what you're asking; can you rephrase it? What does emitting CSV from a JSP have to do with where the data comes from, and why would that make any difference?
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:

I want my controller to get the data from property file or jsp file to and show it in excel sheet.


Firstly, please drop the references to "Excel sheet". If you create CSV, then that's what you have - CSV, which is not an Excel file. It doesn't matter what application is used on the client side to open it.
Also, what does "get the data from JSP file" mean? JSPs are used for generating character data (like HTML or CSV) - they are not a *source* of data.

if i use property file i can display as i want so i want to useJSP.


I don't understand what you're asking; can you rephrase it? What does emitting CSV from a JSP have to do with where the data comes from, and why would that make any difference?



Well, CSV fill should disply content that is in JSP. Since my CSV is being created at controller level i can not access JSP file. so i am asking if there is any solution to this problem?

prob: 1/my CSV file has/display list of values that come from database and 2/i want to add foot note the CSV at the end of that file. 3/this foot note content supposed to come from JSP but 4/i can not access JSP from controller.

many thanks in advance Ulf.



 
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

prob: 1/my CSV file has/display list of values that come from database and 2/i want to add foot note the CSV at the end of that file.


That much is clear.

3/this foot note content supposed to come from JSP but 4/i can not access JSP from controller.


You keep saying that data "comes from the JSP", but again, JSPs are not a source of data - data flows *into* a JSP when the HTML/CSV is generated at the server, but data doesn't *come out* of it.

Do you maybe mean that data is submitted by an HTML form on the client, and that that data should be added to the CSV next time it is generated?
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:

prob: 1/my CSV file has/display list of values that come from database and 2/i want to add foot note the CSV at the end of that file.


That much is clear.

3/this foot note content supposed to come from JSP but 4/i can not access JSP from controller.


You keep saying that data "comes from the JSP", but again, JSPs are not a source of data - data flows *into* a JSP when the HTML/CSV is generated at the server, but data doesn't *come out* of it.

Do you maybe mean that data is submitted by an HTML form on the client, and that that data should be added to the CSV next time it is generated?




Yes data should come from HTML and added to CSV file. but that data is not given by client but he is supposed to get from application based the options choosen from application.

In other words, data or footnote in cvs file changes based on the client chosen options.

please let me know if you need more info.

thanks alot Ulf.




 
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

Yes data should come from HTML and added to CSV file. but that data is not given by client but he is supposed to get from application based the options choosen from application.

In other words, data or footnote in cvs file changes based on the client chosen options.


OK, so there's an HTML form in which the user selects something, and based on that some data is appended to a CSV file the next time that's streamed to a browser. What do you have so far? Where are you stuck making progress?
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


OK, so there's an HTML form in which the user selects something, and based on that some data is appended to a CSV file the next time that's streamed to a browser. What do you have so far? Where are you stuck making progress?



well as i said i am able to display the date in cvs file which is coming from the database but i am not able to add some content in the CSV. so i want to add content through HTML. any suggestion?
 
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

i am not able to add some content in the CSV


Why not? Your code creates the CSV, doesn't it? Why can't it add another line at the end that contains the extra data?
 
Rauhl Roy
Ranch Hand
Posts: 401
Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:

i am not able to add some content in the CSV


Why not? Your code creates the CSV, doesn't it? Why can't it add another line at the end that contains the extra data?




that content is supposed to be dynamic and should come from HTML.
 
Hey! You're stepping on my hand! Help me tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic