wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes paste excel data to a jsp? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "paste excel data to a jsp?" Watch "paste excel data to a jsp?" New topic
Author

paste excel data to a jsp?

marci kick
Greenhorn

Joined: Sep 13, 2005
Posts: 3
I have a requirement to allow an enduser to highlight data in an Excel spreadsheet and to then (somehow) paste that data into a JSP page.

So this solution would require reading from the Windoze clipboard and not directly from a file.

We can ask the user to format the Excel sheet to match the JSP input page.

Has anyone addressed this problem? Our competition has provided a solution using a fat client, I'm assuming with JTables in swing. We'd like to offer the same functionality, but we are a JSP shop.

We want to build it ourselves and not buy an expensive package simply to meet this one requirement.

Thanks!
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

dragon girl,

Welcome to Javaranch! First, a bit of business. We don't have too many rules around here but we do have a Naming Policy. Please adjust your display name accordingly by clicking here.

Thanks.


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Next, JSP has nothing to do with the client other than presenting data. Once the client sees it, it's all HTML and Javascript. As such, this is a problem that more than likely will be handled using Javascript, if it can be done at all. So I'll move this to the HTML and Javascript forum for those experts to take a look at.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41873
    
  63
What functionality do you need that is not provided by copying the cells and pasting them directly into an HTML textarea? When I do that, the tabular structure of the data is preserved, with tabs inserted between cell contents, and newlines between rows. Given that, you can parse the contents on the server and reconstitute the original data for the most part.


Ping & DNS - my free Android networking tools app
marci kick
Greenhorn

Joined: Sep 13, 2005
Posts: 3
Originally posted by Ulf Dittmer:
What functionality do you need that is not provided by copying the cells and pasting them directly into an HTML textarea? When I do that, the tabular structure of the data is preserved, with tabs inserted between cell contents, and newlines between rows. Given that, you can parse the contents on the server and reconstitute the original data for the most part.


we need to offer stuff like multiline cut/paste and, more to your question -- need to offer multiline edit. example: in Excel, you can copy a single cell then highlight a range of cells and press paste, causing all the highlighted cells to now contain data identical to that in the copied cell. (like a mass replace)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41873
    
  63
So you don't want to just paste data into the JSP page to somehow to transfer it to the server, but you want to embed simple spreadsheet-like editing functionality in an HTML page? I'm not aware of any such component that uses just HTML and JS.
marci kick
Greenhorn

Joined: Sep 13, 2005
Posts: 3
Originally posted by Ulf Dittmer:
So you don't want to just paste data into the JSP page to somehow to transfer it to the server, but you want to embed simple spreadsheet-like editing functionality in an HTML page? I'm not aware of any such component that uses just HTML and JS.


i thought AJAX might offer some way. i found this: http://trimpath.com/project/wiki/TrimSpreadsheet and it looked like it was heading in the right direction...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: paste excel data to a jsp?