Okay
  Public Ticket #3183751
Remove backslash
Closed

Comments

  • Thomas Hendrik started the conversation

    Good evening,

    I have an Excel spreadsheet with prices and the word EUR behind them. Unfortunately, a backslash is placed between the price and 'EUR' when importing. How can I remove this without manually changing all the imported data?

    Thomas

  •  1,846
    Miloš replied

    Hi, Thomas 

    Sorry for the delay

    I am honestly not sure if there is a solution to remove the backlash without changing the source data,

    we will do our best to advise you if there is any kind of a workaround.

    Could you please send me the Excel spreadsheet, so that we can replicate this on our Test site, to see the behaviour?

    You can either wrap it in a zipped file, or send me a download link, like weTransfer, for example.

    If it has any sensitive data, please make sure to mark message as PRIVATE.

    Thank you

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  1,846
    Miloš replied

    Hi, Thomas

    Let me know if you can send me a sample of your Excel source data, so that i can inspect what symbol might be causing this to happen.

    I am just guessing at this point, but basically, i think this might be related to the default collation/charset of the WordPress database, where all the tables are created/stored.

    It is not allowing certain special characters to be stored.

     I might have a workaround that you can try. 

    - First thing to do is to change the entire default charset+collation of the WordPress database.

    In my case, my WordPress database name is "current", it will be different for you.

    There are two ways, manually through phpMyAdmin :

    Select the database, go to "Operations", and change the collation as shown, to utf8mb4_unicode_ci

    1652247447.png

    - or you can run an SQL Query on the database, like this :

    ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;

    -

    Now, in the editing tab of the table in WP-Admin, you have to check what is the table name in WP database - You can do this by enabling front-end editing ( you can later disable it, if needed)

    in my case  table name is  wp_wpdatatable_19 :

    3958212676.png

    Then, if you use phpMyAdmin, make sure to select the correct table from the left side, then run an SQL query on the top, and press "Go" button on the bottom right :

    ALTER TABLE wp_wpdatatable_19 CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    

    4209887844.png

    and now it allows me to paste any emojis on the table.

    I am hoping this workaround is not too complicated. It does take a couple of steps to achieve,

    but once you change the table's collation successfully, it will allow you to paste any special symbols.

    Let me know if this helpedsmile.png

    Thank you

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Thomas Hendrik replied

    Hello, here is an example....

    Attached files:  Microsoft Excel-Arbeitsblatt (neu).xlsx

  •  1,846
    Miloš replied

    Hello,

    I tried to import your Excel file and I am unable to reproduce the issue.

    In my Test Website and my Database, if I import this to a Manual table, it imports the euro currency symbol correctly.

    5845375515.png
    8427984462.png

    Here is how it looks from my Database in PhPMyAdmin :


    3056140208.png

    Please note the DB collation which is used in my database tables :

    9413353991.png

    It is slightly different than the collection i advised in the previous reply, but you should get the same results.

    Basically, as mentioned earlier, this is an issue coming from your Database and its current collation set on it.

    Can you please try to follow the steps as explained in my previous reply, then the issue should be resolved and you should be able to import symbols like that to your WP Database?


    2. Another solution can be, to simply remove any symbols from numbers on your source Excel and just leave pure numeric data in the cells where you need euros;

    then you can make integer or Float Column from this in our connected Table and add "suffix" in the Column Display settings.

     ( Just also double check if you have the same Number Format matched in the main plugin settings, and the decimal numbers)

    3329794335.png

    After this, just go in the Display settings of the column, and add any prefix or suffix symbol for currency there.

    7104814461.png
    3473824743.png
    4603617641.png

    This way, you don't have to use String Column type and you will be able to use it fully as numeric data later on, for numerical sorting, filtering, and so on...

    So that is an even better way to solve this.

    Let me know if that helps.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables