aspose file tools*
The moose likes Other Open Source Projects and the fly likes spredsheet should disply the dynamic data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "spredsheet should disply the dynamic data" Watch "spredsheet should disply the dynamic data" New topic
Author

spredsheet should disply the dynamic data

Rauhl Roy
Ranch Hand

Joined: Aug 01, 2006
Posts: 401

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.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61790
    
  67

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rauhl Roy
Ranch Hand

Joined: Aug 01, 2006
Posts: 401

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.
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42952
    
  73
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

Joined: Aug 01, 2006
Posts: 401

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

Joined: Mar 22, 2005
Posts: 42952
    
  73
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

Joined: Aug 01, 2006
Posts: 401

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

Joined: Mar 22, 2005
Posts: 42952
    
  73
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

Joined: Aug 01, 2006
Posts: 401

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

Joined: Mar 22, 2005
Posts: 42952
    
  73
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

Joined: Aug 01, 2006
Posts: 401

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

Joined: Mar 22, 2005
Posts: 42952
    
  73
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

Joined: Aug 01, 2006
Posts: 401

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

Joined: Mar 22, 2005
Posts: 42952
    
  73
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

Joined: Aug 01, 2006
Posts: 401


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

Joined: Mar 22, 2005
Posts: 42952
    
  73
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

Joined: Aug 01, 2006
Posts: 401

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: spredsheet should disply the dynamic data