+ Reply to Thread
Results 1 to 16 of 16

Excel is opeing my CSV file strangely - has moved data around.

  1. #1
    Registered User
    Join Date
    06-22-2019
    Location
    Haywards Heath, UK
    MS-Off Ver
    2016
    Posts
    8

    Excel is opeing my CSV file strangely - has moved data around.

    Hi All

    I hope this is the right place to ask this, and I hope someone can shed some light on what is going on. I have googled and cannot find anything similar.

    I have been working on a CSV file of products and information for my Woo Commerce Wesbite. It was going fine - I have been closing and reopening and it has always opened it to show data where I put it....until now.

    All of a sudden, Excel has been doing strange things to it when it opens it up. I have been opening it as a comma delimited file. When I open it in Google sheets, it looks as it should, but when Excel opens it , it seems to move data around.

    For example, it take some data from Column H and separates it out into a several rows of cells in Column A.

    It also take data from Column AC and moves it to the same row, but Column V.

    This is extremely annoying! Why ,excel, why? Can anyone tell me why it's dong it and how to stop it doing it?

    In the attached screenshot, the file as it should be (this is an .xmls version) is at the top, and the CSV as excel opened it is at the bottom.

    Excel vs Sheets.jpg

    Many thanks

    Becky

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Excel is opeing my CSV file strangely - has moved data around.

    Have you used Text to Columns with any delimiters. Excel can remember previous choices and apply them when you open/import text files.

    If you have, check and clear any delimiters you have used.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    06-22-2019
    Location
    Haywards Heath, UK
    MS-Off Ver
    2016
    Posts
    8

    Re: Excel is opeing my CSV file strangely - has moved data around.

    Quote Originally Posted by TMS View Post
    Have you used Text to Columns with any delimiters. Excel can remember previous choices and apply them when you open/import text files.

    If you have, check and clear any delimiters you have used.
    Hi

    Not that I am aware of. Is her some way I can tell?

    Thanks

    Becks

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Excel is opeing my CSV file strangely - has moved data around.

    If you close Excel completely, then re-open it & open the csv file do you get the same problem?

  5. #5
    Registered User
    Join Date
    06-22-2019
    Location
    Haywards Heath, UK
    MS-Off Ver
    2016
    Posts
    8

    Re: Excel is opeing my CSV file strangely - has moved data around.

    Yes, it does. I also tried copying and pasting it from google sheets into a fresh new excel spreadsheet and saving that as a csv. It looks fine and as it used to, but then when I open it up again - back to the weird version. I don't understand it. i must be doing something differently somehow, but I don't know what has changed!

    It is a CSV UTF-8 version file and when I open it (as I always have done previously) I select Delimited and then choose comma as the delimiter. In column data format i have now tried both general and text - it makes no difference.

    Thanks

    Becky

  6. #6
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Excel is opeing my CSV file strangely - has moved data around.

    Would you be able to share a small sample of the CSV?

  7. #7
    Registered User
    Join Date
    06-22-2019
    Location
    Haywards Heath, UK
    MS-Off Ver
    2016
    Posts
    8

    Re: Excel is opeing my CSV file strangely - has moved data around.

    Hi

    I'm just trying to figure out how to!

    Becky

  8. #8
    Registered User
    Join Date
    06-22-2019
    Location
    Haywards Heath, UK
    MS-Off Ver
    2016
    Posts
    8

    Re: Excel is opeing my CSV file strangely - has moved data around.

    Hmm - I can't figure out how to attach the file to a comment - can you possibly guide me?

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Excel is opeing my CSV file strangely - has moved data around.

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  10. #10
    Registered User
    Join Date
    03-08-2013
    Location
    Lula, Ga.
    MS-Off Ver
    Office 2016
    Posts
    54

    Re: Excel is opeing my CSV file strangely - has moved data around.

    I would study my Styles when SS is working properly, maybe taking some screen shots for reference
    Then upon reopening, I would compare before to now
    If perchance something looks off, then I would trying modifying the Style issue

  11. #11
    Registered User
    Join Date
    06-22-2019
    Location
    Haywards Heath, UK
    MS-Off Ver
    2016
    Posts
    8

    Re: Excel is opeing my CSV file strangely - has moved data around.

    Quote Originally Posted by TMS View Post
    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.


    Thank you - Done.

    I have attached 3 files, beaus the file which is the porblem file opens both ways for me.
    It should look like the excel file "Problem CSV file what it used to and should look like" (saved xls instead of csv for demonstration purposes only)

    I have also saved another demo excel file instead of CSV of what it looks like when I try opening it in excel. Both of the above files look as per my earlierscreenshot too.

    The "Sample of problem CSV file is the one that opens fine in google sheets, but gets changed when opened on excel.
    Thanks Guys.

    Becky

  12. #12
    Registered User
    Join Date
    06-22-2019
    Location
    Haywards Heath, UK
    MS-Off Ver
    2016
    Posts
    8

    Re: Excel is opeing my CSV file strangely - has moved data around.

    Thanks, But I'm afraid this is a bit over my head. I don't know what you mean by studying styles. I have tried visually comparing and have noted the differences I've found previously. It doesn't hep me figure out what is going on though.

  13. #13
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Excel is opeing my CSV file strangely - has moved data around.

    Thanks for the files.

    If I open the csv normally (ie double click) it opens in excel normally, however if I import it using From Text on the data tab I get the same problem.
    It looks as though the import reads the \n\n as a newline character & I have no idea how to stop it from doing that.

  14. #14
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Excel is opeing my CSV file strangely - has moved data around.

    On further inspection it's not the \n that is causing the problem, but there are hidden carriage returns before each \n which is causing the problems.
    The only work round I can think of is to open the file in word Use search/replace & search for ^p\n and replace with \n

  15. #15
    Registered User
    Join Date
    06-22-2019
    Location
    Haywards Heath, UK
    MS-Off Ver
    2016
    Posts
    8

    Re: Excel is opeing my CSV file strangely - has moved data around.

    Hiya

    Oh wow -so yes, if I open it by double clicking from document folder, it opens it normally too! Well spotted, than kyou.

    I'll have a go at the ^p\n replacement too. Thank you and fingers crossed.

  16. #16
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Excel is opeing my CSV file strangely - has moved data around.

    You're welcome & thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 08-03-2018, 09:07 AM
  2. Protecring Excel file, once copied or moved from folder
    By aviko150 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-29-2016, 10:06 PM
  3. Pasting data in a new file acts strangely
    By Irolan in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-29-2015, 09:09 AM
  4. Opening another file from excel, when the file has been moved
    By behrensf84 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2014, 12:35 PM
  5. Storing data from Userform to Shared Excel file wothout opeing the excel file.
    By d.balaji.naik in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-19-2013, 07:37 PM
  6. Replies: 3
    Last Post: 03-08-2006, 06:10 PM
  7. [SOLVED] Excel opeing copies of itself
    By Stuart in forum Excel General
    Replies: 2
    Last Post: 05-16-2005, 07:06 PM

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1