MapInfo Pro

 View Only
  • 1.  Mapinfo sets field as float even when manually selecting character when importing xlsx

    Posted 18 days ago

    Hello,

    I have an excel table with many fields. One of them goes like:

    Samples

    1

    2

    3

    4

    GA12345

    GA123456

    ...

    When importing this table, mapinfo recognizes sample field as float automatically. But, since I don't want to lose the other records I select to treat the field as character. However, when creating a browser I can see that mapinfo still imported the field as float.

    The solution I found is to move one record with a character sample (GA12345) to the beginning, and then it works fine.

    Can anyone please confirm if this is a bug indeed or it just happens to me?

    Thank you



    ------------------------------
    Paolo Banchig
    ------------------------------


  • 2.  RE: Mapinfo sets field as float even when manually selecting character when importing xlsx

    Posted 18 days ago

    In MapInfo 2023 it automatically gets recognized as char and also gets opened that way. Maybe you are using an older version?



    ------------------------------
    Uffe Kousgaard
    CEO
    ROUTEWARE
    Roskilde
    ------------------------------



  • 3.  RE: Mapinfo sets field as float even when manually selecting character when importing xlsx

    Posted 17 days ago

    I have the latest version



    ------------------------------
    Paolo Banchig
    ------------------------------



  • 4.  RE: Mapinfo sets field as float even when manually selecting character when importing xlsx

    Employee
    Posted 18 days ago

    Hi Paolo

    That sounds like a bug but not something I have noticed earlier. 

    MapInfo Pro should, of course, honor the column type you select when opening an Excel file.

    Do you get this misbehavior with a small file with just 6 records as you show above or only if you have thousands of records where the first many records are numerical?



    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------



  • 5.  RE: Mapinfo sets field as float even when manually selecting character when importing xlsx

    Posted 17 days ago
      |   view attached

    The table has over 18000 rows. I attach an example so you can check if this happens to you also



    ------------------------------
    Paolo Banchig
    ------------------------------

    Attachment(s)

    xlsx
    Libro1.xlsx   294 KB 1 version


  • 6.  RE: Mapinfo sets field as float even when manually selecting character when importing xlsx

    Posted 17 days ago

    It works here, if I change the float to char, MapInfo decides for a char(19) and it keeps that field definition after opening the table.

    If it still fails for you, you can just close the file, edit the TAB file header and then open the TAB again.



    ------------------------------
    Uffe Kousgaard
    CEO
    ROUTEWARE
    Roskilde
    ------------------------------



  • 7.  RE: Mapinfo sets field as float even when manually selecting character when importing xlsx

    Employee
    Posted 17 days ago

    Morning Uffe,

    Can you check if the values look fine for you? Especially the values at the end of the table. I want to verify if the issue I described below where the values starting with characters got lost can be replicated.

    Thanks



    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------



  • 8.  RE: Mapinfo sets field as float even when manually selecting character when importing xlsx

    Posted 17 days ago

    Yes, it also stops working correctly for me after record 13548. All blanks.



    ------------------------------
    Uffe Kousgaard
    CEO
    ROUTEWARE
    Roskilde
    ------------------------------



  • 9.  RE: Mapinfo sets field as float even when manually selecting character when importing xlsx

    Employee
    Posted 17 days ago

    OK, it seems to work but then it doesn't.

    We convert the column to Char as specified but the values are all numbers - all the characters seem to have been removed from the table once loaded into MapInfo Pro. The values starting with a character seem to have been changed into an empty string.

    If I format the cells in the first row as Text, MapInfo Pro detects this and suggests using Char(20) as the column type.

    You can also use OGR Vector Files to open Excel files. This also seems to detect the column as Char but for me, it picks a wide column of 254 characters.
    Here you can see the result
    I'd recommend raising a case with our support team on opening the Excel file and changing the column type to char. You can send an email to our support team at support@precisely.com
    Thanks



    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------



  • 10.  RE: Mapinfo sets field as float even when manually selecting character when importing xlsx

    Posted 16 days ago

    Yes, that's exactly the issue. Thank you for the workarounds, I will use them and contact support.



    ------------------------------
    Paolo Banchig
    ------------------------------