Removing extra spaces












0















I'm building a web site and I've got two CSV files. One is from Loves Truck Stops, a list of all their locations, and the other CSV is for my website to display those locations on a map.



I rearranged the Loves CSV to follow to formatting of my site’s CSV and have copied it over to my CSV. However, when I did, I got a lot of extra spacing between words.



There's still a lot of manual formatting I need to do in order to get them to look like the first 8 lines, BUT is there an easy way to delete all that extra spacing that's in between each word on each line? That way there's only one space between each word?



My file



There are over 400 locations JUST for Loves, and I still need to add Pilot, flying J, TA and Petro stops too. 
Doing it manually will just take way too much time.



For anyone concerned: I'm using the "My Maps Locations" plugin for Joomla;
I’m not sure if there's an easier way to convert the Loves XLSM to a CSV or KML formatted for that plugin.










share|improve this question

























  • Your problem is a lot bigger than just “removing extra spaces”.  You say you have two CSV files, but there aren’t any commas after line 8.  Please try to get a better understanding of what you want to do.

    – Scott
    Jan 20 at 0:09











  • Yes I realize there aren't any commas. I'm manually adding them in, amongst adding other things in, which is why I stated "There's still a lot of manual formatting I need to do in order to get them to look like the first 8 lines," I also misspoke, the locations I downloaded from Loves website was an XLMS Originally the Loves XLMS had everything out of order from what the "My Maps Location" plugin needs for the CSV. I was just copying and pasting, but I moved columns around to the right order and just C/P all and just now need to remove the extra white space between words on any given row

    – BDSmith
    Jan 20 at 0:21






  • 2





    images are not very useful. Without the sample text it's hard for anyone else to test

    – phuclv
    Jan 20 at 4:08






  • 2





    You should share the two input files as text and not image

    – aborruso
    Jan 20 at 8:45








  • 2





    Why on earth, when you’re converting large files between formats, would you ask for an automated solution for “removing extra spaces” but then do the rest of the job manually?  (You do realize that you’re talking about converting files between formats, right?)  And what do you even mean by “I rearranged the ‘Loves’ CSV to follow to formatting of my site’s CSV …”? – just that you changed the order of the columns? … … … … … … … … … … And, please, if you’re changing the question, change the question (i.e., edit it) — don’t post comments saying “The above is wrong; I meant to say _______.”

    – Scott
    Jan 20 at 9:34
















0















I'm building a web site and I've got two CSV files. One is from Loves Truck Stops, a list of all their locations, and the other CSV is for my website to display those locations on a map.



I rearranged the Loves CSV to follow to formatting of my site’s CSV and have copied it over to my CSV. However, when I did, I got a lot of extra spacing between words.



There's still a lot of manual formatting I need to do in order to get them to look like the first 8 lines, BUT is there an easy way to delete all that extra spacing that's in between each word on each line? That way there's only one space between each word?



My file



There are over 400 locations JUST for Loves, and I still need to add Pilot, flying J, TA and Petro stops too. 
Doing it manually will just take way too much time.



For anyone concerned: I'm using the "My Maps Locations" plugin for Joomla;
I’m not sure if there's an easier way to convert the Loves XLSM to a CSV or KML formatted for that plugin.










share|improve this question

























  • Your problem is a lot bigger than just “removing extra spaces”.  You say you have two CSV files, but there aren’t any commas after line 8.  Please try to get a better understanding of what you want to do.

    – Scott
    Jan 20 at 0:09











  • Yes I realize there aren't any commas. I'm manually adding them in, amongst adding other things in, which is why I stated "There's still a lot of manual formatting I need to do in order to get them to look like the first 8 lines," I also misspoke, the locations I downloaded from Loves website was an XLMS Originally the Loves XLMS had everything out of order from what the "My Maps Location" plugin needs for the CSV. I was just copying and pasting, but I moved columns around to the right order and just C/P all and just now need to remove the extra white space between words on any given row

    – BDSmith
    Jan 20 at 0:21






  • 2





    images are not very useful. Without the sample text it's hard for anyone else to test

    – phuclv
    Jan 20 at 4:08






  • 2





    You should share the two input files as text and not image

    – aborruso
    Jan 20 at 8:45








  • 2





    Why on earth, when you’re converting large files between formats, would you ask for an automated solution for “removing extra spaces” but then do the rest of the job manually?  (You do realize that you’re talking about converting files between formats, right?)  And what do you even mean by “I rearranged the ‘Loves’ CSV to follow to formatting of my site’s CSV …”? – just that you changed the order of the columns? … … … … … … … … … … And, please, if you’re changing the question, change the question (i.e., edit it) — don’t post comments saying “The above is wrong; I meant to say _______.”

    – Scott
    Jan 20 at 9:34














0












0








0








I'm building a web site and I've got two CSV files. One is from Loves Truck Stops, a list of all their locations, and the other CSV is for my website to display those locations on a map.



I rearranged the Loves CSV to follow to formatting of my site’s CSV and have copied it over to my CSV. However, when I did, I got a lot of extra spacing between words.



There's still a lot of manual formatting I need to do in order to get them to look like the first 8 lines, BUT is there an easy way to delete all that extra spacing that's in between each word on each line? That way there's only one space between each word?



My file



There are over 400 locations JUST for Loves, and I still need to add Pilot, flying J, TA and Petro stops too. 
Doing it manually will just take way too much time.



For anyone concerned: I'm using the "My Maps Locations" plugin for Joomla;
I’m not sure if there's an easier way to convert the Loves XLSM to a CSV or KML formatted for that plugin.










share|improve this question
















I'm building a web site and I've got two CSV files. One is from Loves Truck Stops, a list of all their locations, and the other CSV is for my website to display those locations on a map.



I rearranged the Loves CSV to follow to formatting of my site’s CSV and have copied it over to my CSV. However, when I did, I got a lot of extra spacing between words.



There's still a lot of manual formatting I need to do in order to get them to look like the first 8 lines, BUT is there an easy way to delete all that extra spacing that's in between each word on each line? That way there's only one space between each word?



My file



There are over 400 locations JUST for Loves, and I still need to add Pilot, flying J, TA and Petro stops too. 
Doing it manually will just take way too much time.



For anyone concerned: I'm using the "My Maps Locations" plugin for Joomla;
I’m not sure if there's an easier way to convert the Loves XLSM to a CSV or KML formatted for that plugin.







notepad++ csv






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 20 at 9:31









Scott

15.8k113990




15.8k113990










asked Jan 19 at 23:37









BDSmithBDSmith

11




11













  • Your problem is a lot bigger than just “removing extra spaces”.  You say you have two CSV files, but there aren’t any commas after line 8.  Please try to get a better understanding of what you want to do.

    – Scott
    Jan 20 at 0:09











  • Yes I realize there aren't any commas. I'm manually adding them in, amongst adding other things in, which is why I stated "There's still a lot of manual formatting I need to do in order to get them to look like the first 8 lines," I also misspoke, the locations I downloaded from Loves website was an XLMS Originally the Loves XLMS had everything out of order from what the "My Maps Location" plugin needs for the CSV. I was just copying and pasting, but I moved columns around to the right order and just C/P all and just now need to remove the extra white space between words on any given row

    – BDSmith
    Jan 20 at 0:21






  • 2





    images are not very useful. Without the sample text it's hard for anyone else to test

    – phuclv
    Jan 20 at 4:08






  • 2





    You should share the two input files as text and not image

    – aborruso
    Jan 20 at 8:45








  • 2





    Why on earth, when you’re converting large files between formats, would you ask for an automated solution for “removing extra spaces” but then do the rest of the job manually?  (You do realize that you’re talking about converting files between formats, right?)  And what do you even mean by “I rearranged the ‘Loves’ CSV to follow to formatting of my site’s CSV …”? – just that you changed the order of the columns? … … … … … … … … … … And, please, if you’re changing the question, change the question (i.e., edit it) — don’t post comments saying “The above is wrong; I meant to say _______.”

    – Scott
    Jan 20 at 9:34



















  • Your problem is a lot bigger than just “removing extra spaces”.  You say you have two CSV files, but there aren’t any commas after line 8.  Please try to get a better understanding of what you want to do.

    – Scott
    Jan 20 at 0:09











  • Yes I realize there aren't any commas. I'm manually adding them in, amongst adding other things in, which is why I stated "There's still a lot of manual formatting I need to do in order to get them to look like the first 8 lines," I also misspoke, the locations I downloaded from Loves website was an XLMS Originally the Loves XLMS had everything out of order from what the "My Maps Location" plugin needs for the CSV. I was just copying and pasting, but I moved columns around to the right order and just C/P all and just now need to remove the extra white space between words on any given row

    – BDSmith
    Jan 20 at 0:21






  • 2





    images are not very useful. Without the sample text it's hard for anyone else to test

    – phuclv
    Jan 20 at 4:08






  • 2





    You should share the two input files as text and not image

    – aborruso
    Jan 20 at 8:45








  • 2





    Why on earth, when you’re converting large files between formats, would you ask for an automated solution for “removing extra spaces” but then do the rest of the job manually?  (You do realize that you’re talking about converting files between formats, right?)  And what do you even mean by “I rearranged the ‘Loves’ CSV to follow to formatting of my site’s CSV …”? – just that you changed the order of the columns? … … … … … … … … … … And, please, if you’re changing the question, change the question (i.e., edit it) — don’t post comments saying “The above is wrong; I meant to say _______.”

    – Scott
    Jan 20 at 9:34

















Your problem is a lot bigger than just “removing extra spaces”.  You say you have two CSV files, but there aren’t any commas after line 8.  Please try to get a better understanding of what you want to do.

– Scott
Jan 20 at 0:09





Your problem is a lot bigger than just “removing extra spaces”.  You say you have two CSV files, but there aren’t any commas after line 8.  Please try to get a better understanding of what you want to do.

– Scott
Jan 20 at 0:09













Yes I realize there aren't any commas. I'm manually adding them in, amongst adding other things in, which is why I stated "There's still a lot of manual formatting I need to do in order to get them to look like the first 8 lines," I also misspoke, the locations I downloaded from Loves website was an XLMS Originally the Loves XLMS had everything out of order from what the "My Maps Location" plugin needs for the CSV. I was just copying and pasting, but I moved columns around to the right order and just C/P all and just now need to remove the extra white space between words on any given row

– BDSmith
Jan 20 at 0:21





Yes I realize there aren't any commas. I'm manually adding them in, amongst adding other things in, which is why I stated "There's still a lot of manual formatting I need to do in order to get them to look like the first 8 lines," I also misspoke, the locations I downloaded from Loves website was an XLMS Originally the Loves XLMS had everything out of order from what the "My Maps Location" plugin needs for the CSV. I was just copying and pasting, but I moved columns around to the right order and just C/P all and just now need to remove the extra white space between words on any given row

– BDSmith
Jan 20 at 0:21




2




2





images are not very useful. Without the sample text it's hard for anyone else to test

– phuclv
Jan 20 at 4:08





images are not very useful. Without the sample text it's hard for anyone else to test

– phuclv
Jan 20 at 4:08




2




2





You should share the two input files as text and not image

– aborruso
Jan 20 at 8:45







You should share the two input files as text and not image

– aborruso
Jan 20 at 8:45






2




2





Why on earth, when you’re converting large files between formats, would you ask for an automated solution for “removing extra spaces” but then do the rest of the job manually?  (You do realize that you’re talking about converting files between formats, right?)  And what do you even mean by “I rearranged the ‘Loves’ CSV to follow to formatting of my site’s CSV …”? – just that you changed the order of the columns? … … … … … … … … … … And, please, if you’re changing the question, change the question (i.e., edit it) — don’t post comments saying “The above is wrong; I meant to say _______.”

– Scott
Jan 20 at 9:34





Why on earth, when you’re converting large files between formats, would you ask for an automated solution for “removing extra spaces” but then do the rest of the job manually?  (You do realize that you’re talking about converting files between formats, right?)  And what do you even mean by “I rearranged the ‘Loves’ CSV to follow to formatting of my site’s CSV …”? – just that you changed the order of the columns? … … … … … … … … … … And, please, if you’re changing the question, change the question (i.e., edit it) — don’t post comments saying “The above is wrong; I meant to say _______.”

– Scott
Jan 20 at 9:34










1 Answer
1






active

oldest

votes


















0














As the comments have said, your real problem is much bigger than extra spaces. But if the spaces are all you care about for this question, then




  • Find What = h+ (this will match any instance of one or more spaces, tabs, or other horizontal whitespace)

  • Replace With = x20 (or you could use a single space, but that's hard to see in the post)

  • Search Mode = Regular Expression


Trying to guess what you did: you went to https://www.loves.com/en/location-and-fuel-price-search/locationsearchresults or similar, then clicked the "Export Locations in Excel", which downloaded an .xlsx; then once the spreadsheet opened, you COPIED the data into Notepad++. Explanation: When you copy/pasted from the spreadsheet program (I'm guessing Excel, but it could be a different one), that program included tabs to separate the various columns.



If that's the case, what you should have done: once it was in your spreadsheet program, do your various column-rearranging and column-deleting in the spreadsheet tool, so that it will match the right format for "your CSV". Once done, then File > Save As, and pick CSV (Comma Separated) as your file-type. It should then easily integrate with whatever CSV-reading system "your CSV" is intended for.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1396200%2fremoving-extra-spaces%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    As the comments have said, your real problem is much bigger than extra spaces. But if the spaces are all you care about for this question, then




    • Find What = h+ (this will match any instance of one or more spaces, tabs, or other horizontal whitespace)

    • Replace With = x20 (or you could use a single space, but that's hard to see in the post)

    • Search Mode = Regular Expression


    Trying to guess what you did: you went to https://www.loves.com/en/location-and-fuel-price-search/locationsearchresults or similar, then clicked the "Export Locations in Excel", which downloaded an .xlsx; then once the spreadsheet opened, you COPIED the data into Notepad++. Explanation: When you copy/pasted from the spreadsheet program (I'm guessing Excel, but it could be a different one), that program included tabs to separate the various columns.



    If that's the case, what you should have done: once it was in your spreadsheet program, do your various column-rearranging and column-deleting in the spreadsheet tool, so that it will match the right format for "your CSV". Once done, then File > Save As, and pick CSV (Comma Separated) as your file-type. It should then easily integrate with whatever CSV-reading system "your CSV" is intended for.






    share|improve this answer




























      0














      As the comments have said, your real problem is much bigger than extra spaces. But if the spaces are all you care about for this question, then




      • Find What = h+ (this will match any instance of one or more spaces, tabs, or other horizontal whitespace)

      • Replace With = x20 (or you could use a single space, but that's hard to see in the post)

      • Search Mode = Regular Expression


      Trying to guess what you did: you went to https://www.loves.com/en/location-and-fuel-price-search/locationsearchresults or similar, then clicked the "Export Locations in Excel", which downloaded an .xlsx; then once the spreadsheet opened, you COPIED the data into Notepad++. Explanation: When you copy/pasted from the spreadsheet program (I'm guessing Excel, but it could be a different one), that program included tabs to separate the various columns.



      If that's the case, what you should have done: once it was in your spreadsheet program, do your various column-rearranging and column-deleting in the spreadsheet tool, so that it will match the right format for "your CSV". Once done, then File > Save As, and pick CSV (Comma Separated) as your file-type. It should then easily integrate with whatever CSV-reading system "your CSV" is intended for.






      share|improve this answer


























        0












        0








        0







        As the comments have said, your real problem is much bigger than extra spaces. But if the spaces are all you care about for this question, then




        • Find What = h+ (this will match any instance of one or more spaces, tabs, or other horizontal whitespace)

        • Replace With = x20 (or you could use a single space, but that's hard to see in the post)

        • Search Mode = Regular Expression


        Trying to guess what you did: you went to https://www.loves.com/en/location-and-fuel-price-search/locationsearchresults or similar, then clicked the "Export Locations in Excel", which downloaded an .xlsx; then once the spreadsheet opened, you COPIED the data into Notepad++. Explanation: When you copy/pasted from the spreadsheet program (I'm guessing Excel, but it could be a different one), that program included tabs to separate the various columns.



        If that's the case, what you should have done: once it was in your spreadsheet program, do your various column-rearranging and column-deleting in the spreadsheet tool, so that it will match the right format for "your CSV". Once done, then File > Save As, and pick CSV (Comma Separated) as your file-type. It should then easily integrate with whatever CSV-reading system "your CSV" is intended for.






        share|improve this answer













        As the comments have said, your real problem is much bigger than extra spaces. But if the spaces are all you care about for this question, then




        • Find What = h+ (this will match any instance of one or more spaces, tabs, or other horizontal whitespace)

        • Replace With = x20 (or you could use a single space, but that's hard to see in the post)

        • Search Mode = Regular Expression


        Trying to guess what you did: you went to https://www.loves.com/en/location-and-fuel-price-search/locationsearchresults or similar, then clicked the "Export Locations in Excel", which downloaded an .xlsx; then once the spreadsheet opened, you COPIED the data into Notepad++. Explanation: When you copy/pasted from the spreadsheet program (I'm guessing Excel, but it could be a different one), that program included tabs to separate the various columns.



        If that's the case, what you should have done: once it was in your spreadsheet program, do your various column-rearranging and column-deleting in the spreadsheet tool, so that it will match the right format for "your CSV". Once done, then File > Save As, and pick CSV (Comma Separated) as your file-type. It should then easily integrate with whatever CSV-reading system "your CSV" is intended for.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 29 at 20:03









        PeterCJPeterCJ

        345310




        345310






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1396200%2fremoving-extra-spaces%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Index of /

            Tribalistas

            Listed building