• 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

paste excel data to a jsp?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
marci kick
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
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 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
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic