+ Reply to Thread
Results 1 to 5 of 5

Enter messes up CSV/XLSX file

  1. #1
    Registered User
    Join Date
    08-13-2013
    Location
    Sverige
    MS-Off Ver
    Excel 2013
    Posts
    16

    Enter messes up CSV/XLSX file

    Hello!

    We are trying to import a very large file. We exported it but when looking at it in CSV and XLSX it looks weird.

    The exported file has double enters. Which makes the


    ID,Description,Price,Quantity:

    xx,Description 1,100,50
    xx,Description 2,100,50
    xx,Description 3,100,50
    xx,Description 4
    with enters,100,50


    The Description 4 that had enter in it. Breaks the rows. And from then on the "with" are the new ID.

    The file are all good when opening it with Numbers (Mac).

    The file has 15000 rows so we would need an automatic solution. Anyone here know why this happens?

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Enter messes up CSV/XLSX file

    Are you saying/implying that the first three just have a line feed character at the end but the fourth item has both a line feed and a carriage return. i.e. is the fourth item different to the other three?

    Can you upload a copy of the csv file that contains a representative sample of the the rows exhibiting this behaviour. Perhaps 30 or so rows would suffice
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    08-13-2013
    Location
    Sverige
    MS-Off Ver
    Excel 2013
    Posts
    16

    Re: Enter messes up CSV/XLSX file

    Hello! Thank you for your reply!

    Sadly I can not since it is a clients file. I hope the below example and answer helps!


    "Are you saying/implying that the first three just have a line feed character at the end but the fourth item has both a line feed and a carriage return. i.e. is the fourth item different to the other three?"

    Some cells has a description without carriage return. But the ones that do - casuses problem.

    The problem that happens is that the rows are skipped. And on the new row that are created continues from after the carriage return. Meaning: If we in a description add a carriage return. That will end that row, and continue a new row.

    Row1: xx,Description 1,100,50
    Row2: xx,Description 2,100,50
    Row3: xx,Description 3,100,50
    Row4: xx,Description 4 (here carrige return are happening)
    Row5: with enters,100,50

    But we want it to be like this:
    Row1: xx,Description 1,100,50
    Row2: xx,Description 2,100,50
    Row3: xx,Description 3,100,50
    Row4: xx,Description 4 with enters,100,50

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Enter messes up CSV/XLSX file

    Difficult to comment out of context. Can't you copy a few of the rows and anonymise any sensitive text.

    Have you tried using a text editor on the csv file and finding and deleting all carriage return characters?

  5. #5
    Registered User
    Join Date
    08-13-2013
    Location
    Sverige
    MS-Off Ver
    Excel 2013
    Posts
    16

    Re: Enter messes up CSV/XLSX file

    I did my best, but it is not a real representation due to client info and that vast amount of data:

    ExcelForum.xlsx

    I hope this helps!

+ 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: 8
    Last Post: 12-23-2022, 04:09 AM
  2. Replies: 5
    Last Post: 12-23-2022, 04:02 AM
  3. Help with code to convert xls to xlsx and continue with xlsx file
    By 3345james in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-02-2016, 11:47 AM
  4. Replies: 3
    Last Post: 01-05-2014, 05:50 AM
  5. Replies: 4
    Last Post: 10-23-2013, 12:54 AM
  6. How to add the columns data of several xlsx files of a folder in another xlsx file
    By ravikumar00008 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-25-2012, 04:29 AM
  7. Importing txt file into excel but save as messes it up...
    By Dustin S. in forum Excel General
    Replies: 0
    Last Post: 01-14-2009, 03:11 PM

Tags for this Thread

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