Forums

Find answers, ask questions, and connect with our
community all around the world.

Home Forum Omnis General Forum web import data

  • web import data

    Posted by Coralie on August 12, 2019 at 9:43 am

    Hi everyone,
    I have a web form with a grid that needs to be filled when a user upload a .txt or .csv file. Since it is web, I’m using the JSFormFile obj so I get the data in binary.
    Is there an easy way to pass those data in a list or do I have to analyze its content and build the list?
    Thanks in advance,
    Regards,
    Coralie

    Diego Mendoza Muñoz replied 4 years, 10 months ago 2 Members · 1 Reply
  • 1 Reply
  • Diego Mendoza Muñoz

    Member
    September 25, 2019 at 7:56 pm

    Calculate export as con(ubicacion,”temp_”,dat(#D,’y-M-D-H-N-S’),”.txt”)
    Calculate $root.$prefs.$exportencoding as kUniTypeUTF8
    Calculate $root.$prefs.$importencoding as kUniTypeUTF8
    Calculate binData as chartoutf8(vi_Text)
    Create file (export)
    Open file (export,refNum)
    Write file as binary (refNum,binData)
    Close file (refNum)
    Do sleep(30)
    Set import file name {[export]}
    Prepare for import from file {Delimited (tabs)}
    Import data vi_Lista
    Close import file
    Do sleep(30)
    Do FileOps.$deletefile(export)
    I use this method in server side
    I hope this was usefull

Log in to reply.