How can users paste tabular data into a web-based VB.NET app?

Discussion in 'ASP .Net Web Controls' started by The Red Knight Mike, Jun 5, 2008.

  1. * First post - please advise me if this should be posted to some other group *

    Hi folks,

    I work at a small government agency. We have contractors developing a VB.NET
    app to capture chemicals and their concentrations, as found at hazardous
    waste sites. Staff will be entering the info once the app is developed.

    The staff often get electronic docs with this chemical and concentration
    data existing as long tables in the doc. Format could be anything but is
    often a Word doc, Excel ss, or PDF.

    Our staff would really, really like to be able to simply cut and paste these
    tables into our new VB.NET app, from whatever other electronic source. (In
    fact, it's liable to make or break the app.) In particular, the app should be
    able to 1) handle various origin formats (the doc types listed above) being
    in the paste buffer, as well as 2) allow the whole source table (with dozens
    of rows) to be pasted in one fell swoop. These tables have complex chemical
    names and concentrations you don't want to make a single transcription error
    on. (I think we can handle the possibility of different sources having data
    "fields" in differing columns - that shouldn't be a problem.)

    A key contact on our programming team says that "we present a 'dumb' html
    data entry webpage; you can't just cut and paste a whole table into a cell of
    it".

    I can't help but think there must be *some* way to accomplish this...
    perhaps, instead of copy and paste per se, the user would copy from the
    source, then click some sort of control in the VB.NET application, which
    would fire some applet whose purpose is to process the paste buffer and
    populate the data into our target data fields.

    As you can see, I only barely know some of these technical terms. But I
    can't help but think there must be some way to paste / process a table in the
    paste buffer. Could anyone please advise us re: possible solutions? It'd be
    greatly appreciated!

    Mike
    Atlanta GA
    The Red Knight Mike, Jun 5, 2008
    #1
    1. Advertising

  2. If you want this to be able to be done using a web application, my
    suggestion would be to create a page that takes the following steps:

    1. Allows the user to upload the data file
    2. On the postback, the data from the uploaded file will be imported into
    wherever you want

    This will allow you do avoid forcing the user to take any extra steps in
    preparing the data, as well as allow you to do all the data transferring on
    the server-side. You may also want to have the application delete the
    uploaded file after the data has been imported so you don't need to worry
    about having a bunch of extra uploaded files on your server. But another
    question I would like to ask you is whether you really want a web-based
    application or a desktop network application? Anyway, I have told you my
    suggestion, so good luck!
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "The Red Knight Mike" <The Red Knight > wrote
    in message news:...
    >* First post - please advise me if this should be posted to some other
    >group *
    >
    > Hi folks,
    >
    > I work at a small government agency. We have contractors developing a
    > VB.NET
    > app to capture chemicals and their concentrations, as found at hazardous
    > waste sites. Staff will be entering the info once the app is developed.
    >
    > The staff often get electronic docs with this chemical and concentration
    > data existing as long tables in the doc. Format could be anything but is
    > often a Word doc, Excel ss, or PDF.
    >
    > Our staff would really, really like to be able to simply cut and paste
    > these
    > tables into our new VB.NET app, from whatever other electronic source. (In
    > fact, it's liable to make or break the app.) In particular, the app should
    > be
    > able to 1) handle various origin formats (the doc types listed above)
    > being
    > in the paste buffer, as well as 2) allow the whole source table (with
    > dozens
    > of rows) to be pasted in one fell swoop. These tables have complex
    > chemical
    > names and concentrations you don't want to make a single transcription
    > error
    > on. (I think we can handle the possibility of different sources having
    > data
    > "fields" in differing columns - that shouldn't be a problem.)
    >
    > A key contact on our programming team says that "we present a 'dumb' html
    > data entry webpage; you can't just cut and paste a whole table into a cell
    > of
    > it".
    >
    > I can't help but think there must be *some* way to accomplish this...
    > perhaps, instead of copy and paste per se, the user would copy from the
    > source, then click some sort of control in the VB.NET application, which
    > would fire some applet whose purpose is to process the paste buffer and
    > populate the data into our target data fields.
    >
    > As you can see, I only barely know some of these technical terms. But I
    > can't help but think there must be some way to paste / process a table in
    > the
    > paste buffer. Could anyone please advise us re: possible solutions? It'd
    > be
    > greatly appreciated!
    >
    > Mike
    > Atlanta GA
    Nathan Sokalski, Jun 8, 2008
    #2
    1. Advertising

  3. Thanks very much for your input, Nathan.

    You were mentioning "uploading a data file". Note that we specifically want
    to cut and paste, not upload a data file. Thus we need a control that can
    read from the paste buffer. Then a method - hopefully one pre-written - that
    can parse through whatever is in the paste buffer, to determine cell and row
    boundaries.

    With a little experimentation, I found that simply cutting and pasting from
    Word and Excel into a large, empty text box in this web app resulted in
    pretty usable results: cells were separated by tabs, and rows by carriage
    returns. However, pasting from PDFs put spaces instead of tabs between cells,
    which is a problem, because a lot of the data has spaces in it (names, etc.).
    Cutting and pasting from a web html table is also a little problematic, but
    if the user c&ps into Excel first, then c&ps that into the web textbox, it
    works ok.

    Any further thoughts from anyone are greatly appreciated!

    "Nathan Sokalski" wrote:

    > If you want this to be able to be done using a web application, my
    > suggestion would be to create a page that takes the following steps:
    >
    > 1. Allows the user to upload the data file
    > 2. On the postback, the data from the uploaded file will be imported into
    > wherever you want
    >
    > This will allow you do avoid forcing the user to take any extra steps in
    > preparing the data, as well as allow you to do all the data transferring on
    > the server-side. You may also want to have the application delete the
    > uploaded file after the data has been imported so you don't need to worry
    > about having a bunch of extra uploaded files on your server. But another
    > question I would like to ask you is whether you really want a web-based
    > application or a desktop network application? Anyway, I have told you my
    > suggestion, so good luck!
    > --
    > Nathan Sokalski
    >
    > http://www.nathansokalski.com/
    The Red Knight Mike, Jun 10, 2008
    #3
  4. It sounds like you have a way to do this for some file formats, but not
    others. A partial solution for this might be to also ask the user what file
    format they are copying & pasting from. But I am pretty sure that there is
    no solution for the formats that use spaces, because I am pretty sure there
    is no way to read from the paste buffer in a web application (probably for
    security reasons). There may be a way using an ActiveX control or Java
    Applet (I've never written ActiveX controls, and it's been a long time since
    I ever wrote a Java Applet), but not in the web application itself. I wish I
    had a more useful answer, but to the best of my knowledge there isn't one.
    --
    Nathan Sokalski

    http://www.nathansokalski.com/

    "The Red Knight Mike" <> wrote in
    message news:...
    > Thanks very much for your input, Nathan.
    >
    > You were mentioning "uploading a data file". Note that we specifically
    > want
    > to cut and paste, not upload a data file. Thus we need a control that can
    > read from the paste buffer. Then a method - hopefully one pre-written -
    > that
    > can parse through whatever is in the paste buffer, to determine cell and
    > row
    > boundaries.
    >
    > With a little experimentation, I found that simply cutting and pasting
    > from
    > Word and Excel into a large, empty text box in this web app resulted in
    > pretty usable results: cells were separated by tabs, and rows by carriage
    > returns. However, pasting from PDFs put spaces instead of tabs between
    > cells,
    > which is a problem, because a lot of the data has spaces in it (names,
    > etc.).
    > Cutting and pasting from a web html table is also a little problematic,
    > but
    > if the user c&ps into Excel first, then c&ps that into the web textbox, it
    > works ok.
    >
    > Any further thoughts from anyone are greatly appreciated!
    >
    > "Nathan Sokalski" wrote:
    >
    >> If you want this to be able to be done using a web application, my
    >> suggestion would be to create a page that takes the following steps:
    >>
    >> 1. Allows the user to upload the data file
    >> 2. On the postback, the data from the uploaded file will be imported into
    >> wherever you want
    >>
    >> This will allow you do avoid forcing the user to take any extra steps in
    >> preparing the data, as well as allow you to do all the data transferring
    >> on
    >> the server-side. You may also want to have the application delete the
    >> uploaded file after the data has been imported so you don't need to worry
    >> about having a bunch of extra uploaded files on your server. But another
    >> question I would like to ask you is whether you really want a web-based
    >> application or a desktop network application? Anyway, I have told you my
    >> suggestion, so good luck!
    >> --
    >> Nathan Sokalski
    >>
    >> http://www.nathansokalski.com/

    >
    Nathan Sokalski, Jun 10, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. t
    Replies:
    3
    Views:
    573
    Pier Paolo
    Feb 16, 2006
  2. PhuWong
    Replies:
    0
    Views:
    420
    PhuWong
    Feb 25, 2006
  3. Luigi Donatello Asero

    Layout versus tabular data.

    Luigi Donatello Asero, Oct 14, 2005, in forum: HTML
    Replies:
    8
    Views:
    477
    Luigi Donatello Asero
    Oct 14, 2005
  4. richard
    Replies:
    19
    Views:
    584
    Hywel Jenkins
    Sep 28, 2006
  5. bitshift
    Replies:
    1
    Views:
    526
    bruce barker
    Jun 22, 2007
Loading...

Share This Page