• 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

Validating Excel spreadsheet in javascript

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To start off, I found some information about reading Excel files via javascript, but none of the information I found seems to work as expected. This is what all I want to do (don't laugh):

  • Read an existing Excel spreadsheet that has been selected for upload
  • Go through the columns starting at row 2 to check for anything that is either mising that should exist or incorrect
  • Flag any of those columns (perhaps highlight), or if that's not possible, if I read it, I can display an error alert.


  • Now I get that it may be a little more complex than "all I want", but this is what I would like to be able to do. We had tested JExcel awhile back that would have done that via the back-end -- and I certainly am doing back-end validation -- but I would really like to have the user be able to make the needed changes prior to uploading since it will actually save a step (they currently get a notification that their request has been denied for validation errors). I figure if they could get their spreadsheet validated prior to uploading the spreadsheet, it woudl help eliminate the annoyance factor.

    Any help would greatly be appreciated. Thanks.
     
    Marshal
    Posts: 28193
    95
    Eclipse IDE Firefox Browser MySQL Database
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Well, as far as I can see there are only two problems with that scenario.

    First, Javascript has no access to the client's file system, so getting the data from the Excel file to somewhere that Javascript can see it could be technically challenging.

    Second, there's the issue of writing Javascript code which can read and understand Excel. Because of the first problem I mentioned, it's likely that nobody has yet tried to do that. (Although don't let me stop you from searching the web to find that code!) I would budget about three years to get something functional working.
     
    Onion rings are vegetable donuts. Taste this tiny ad:
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic