Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Event Streams in Action this week in the Java in General forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Import file into Web app

 
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I got this question from someone at work. Could someone please shed some light on this?

"would be possible for us to accept certain file formats for upload, read the data, and prefill the application?

Specifically, I was wondering if we could ask people to upload their Quicken or TurboTax files (.qdf, .qxf, .tax, etc) or a .pdf of a tax form and we could prefill all of their data into the application.

Of course, we might need to be able to read all kinds of documents and see how we can pull the data we need out of each one, and maybe build a different app for that but I’m just starting with the idea.. "


Ours is an Spring based online web application for credit that takes the user's information, so they're trying to add these options.
 
Saloon Keeper
Posts: 5711
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, web apps can accept file uploads, whether they're Spring-based or not.

The question of reading the file is independent of that, and you'll need to give some thought as to what file formats make sense to support.
 
Prasanna Raman
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. The aim is to be able to import the customer's documents, let's say their tax forms, and pre-fill information from that document onto the Web app. Would it be possible to do something like this? I'm not sure how we'd look for pieces of information we need from the document.

 
Sheriff
Posts: 24594
55
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, when I was working we had all kinds of applications where people uploaded spreadsheets and the like and we extracted data from them. So yes, it's possible.

As for your specific requirements... well, you don't quite have any yet, I guess. But every time somebody says "We want to upload a file of type X and extract data Y and Z from it" you're going to have to write some code which knows how to extract Y and Z from an X file. Don't try to write any fancy generalized code which works for everything yet. Instead just take it one request at a time, and if you see you're getting a lot of requests which are similar but not identical you can consider refactoring at that point.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!