Alpha Video Training
Results 1 to 11 of 11

Thread: Import Excel into List - Alpha Bug?

  1. #1
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,841

    Default Import Excel into List - Alpha Bug?

    Web App running 5667-5254.

    I'm using the import excel into list JS action method. Letters are not importing however...

    Ashampoo_Snap_Tuesday, April 23, 2019_10h21m56s_001_.png
    Ashampoo_Snap_Monday, April 22, 2019_18h12m40s_009_.png
    Ashampoo_Snap_Monday, April 22, 2019_18h09m15s_008_.png

    Anyone else having such an issue?

    I've run my test case component in 5487-5217 and have the same problem.
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  2. #2
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,841

    Default Re: Import Excel into List - Alpha Bug?

    **BUMP** ...I'm still stumped. I sent a bug report to Alpha but haven't heard back from them.

    Maybe someone would be kind enough to see if they are getting the same results? ...and maybe point out some error I made?

    Sample UX Component

    SQL table file

    Sample Excel File

    I put my samples in Google Drive because the forum said "invalid file" when I tried to upload them.
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  3. #3
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,433

    Default Re: Import Excel into List - Alpha Bug?

    Hi Mike,

    Had not realised this existed and just gave it a try. Could not seem to get it to load an xslx file but with an xls version of the same spreadsheet it worked better than I expected except I got the opposite of you and no numbers were imported! I tried the mysql number column in both int and char formats and nothing. I need to try this out more as it will potentially save me a lot of time.

    I will try and look at your samples later, quite a busy day at work today

  4. #4
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,433

    Default Re: Import Excel into List - Alpha Bug?

    I have just had a look at your samples and I do not know too much about SQL_server but is it because your characters field is nchar type? with what I just tried it worked well with just char type fields

  5. #5
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,841

    Default Re: Import Excel into List - Alpha Bug?

    Hi Lance. That shouldn't make any difference.

    If you look at my screenshots I posted you can see that in the preprocess xbasic function the data isn't coming over even before the actual import.
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  6. #6
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,841

    Default Re: Import Excel into List - Alpha Bug?

    Got some feedback from Alpha on this...

    From Selwyn:

    the first issue is not an AA bug. it could be considered a Microsoft ODBC driver for Excel bug.
    The reason that is is not an AA bug is that the ODBC driver expects to see consistent data types in a column.
    so if a column is all numbers that's find.
    if a column is numbers and some text, the numbers need to be formatted as text

    the second issue is also not a bug. i was able to open the file fine. perhaps you do not have update to date microsoft data access drivers.
    here is a test from the interactive window you can do yourself.
    if you don't get the same results I do, then the problem is your microsoft data access drivers


    fn = "C:\bugs\mike_brown_excel\Import_Test.xlsx"
    ?a5_getexcelinfo(fn)
    = alltables = Sheet1$

    cs = "{A5API=Excel,FileName='C:\bugs\mike_brown_excel\Import_Test.xlsx',A5ExcelVersion=2010}"

    haserror = .F.
    table = "Sheet1$"
    dim cn as sql::Connection
    ?cn.open(cs)
    = .T.
    sql = "select * from " + "[" + table + "]"
    ?cn.Execute(sql)
    = .T.
    json = cn.ResultSet.tojson()
    showvar(json)
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  7. #7
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,841

    Default Re: Import Excel into List - Alpha Bug?

    Another update from Selwyn for those interested...

    it turns out that AA has two ways of reading an excel file
    1. using Microsoft ODBC drivers
    2. using the libXL library (which we bundle with AA).

    the libXL library is much more robust than ODBC and therefore I have switched the code that does excel import to use the libXL library.
    as a result of this change your excel file will import without your having to make any changes to the file.
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  8. #8
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,433

    Default Re: Import Excel into List - Alpha Bug?

    Hi Mike,

    Yes to confirm I tried your excel spreadsheet into a mySQL char field in my own UX and got the same result as you.

    Also I have been trying to import 4 columns of data from an excel spreadsheet into one of my tables (3 character and 1 numeric) the character fields which contain a mix of alphanumeric characters reproduce perfectly but the numeric column does not import at all, and it does not show in the xbasic debugger either. Something very strange going on here.

  9. #9
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,433

    Default Re: Import Excel into List - Alpha Bug?

    Sorry did not see the two previous reply's before pushing the send button!

  10. #10
    "Certified" Alphaholic mikeallenbrown's Avatar
    Real Name
    Mike Brown
    Join Date
    Nov 2009
    Location
    United States
    Posts
    1,841

    Default Re: Import Excel into List - Alpha Bug?

    Today's prerelease fixes these issues.

    Also, there are two new functions available when handling excel files in xbasic...

    excel_to_resultset()

    excel_to_json()
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant

  11. #11
    "Certified" Alphaholic Lance Gurd's Avatar
    Real Name
    Lance Gurd
    Join Date
    Jun 2005
    Location
    Southampton, UK
    Posts
    1,433

    Default Re: Import Excel into List - Alpha Bug?

    Confirm this works, now to work on some post import processing xbasic to get the desired data

Similar Threads

  1. Import to List from Excel
    By mikeallenbrown in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 09-01-2017, 07:26 PM
  2. how to import data excel from excel file was exported from alpha?
    By amitloh in forum Mobile & Browser Applications
    Replies: 6
    Last Post: 04-12-2017, 03:11 PM
  3. Import data from Excel into list -- Not available??
    By mikeallenbrown in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 08-15-2016, 05:23 PM
  4. how to import data excel from excel file was exported from alpha?
    By zatuzee in forum Mobile & Browser Applications
    Replies: 9
    Last Post: 07-21-2015, 06:00 AM
  5. Import excel or CSV to UX (with list)
    By WindForce in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 04-20-2015, 05:01 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •