• Save as csv creates trailing space

    Author
    Topic
    #504307

    have an excel sheet where saving as file format xlCSV keeps all of the columns but one column is having a trailing space added to the text.

    [TABLE=”class: grid, width: 500″]
    [TR]
    [TD]EMPLOYEE[/TD]
    [TD]PAYCODE[/TD]
    [TD]HOURS[/TD]
    [TD]DATE WORKED[/TD]
    [TD]PROJECT[/TD]
    [/TR]
    [TR]
    [TD]NE00001[/TD]
    [TD]LSHR[/TD]
    [TD]45[/TD]
    [TD]01/24/2016[/TD]
    [TD]default[/TD]
    [/TR]
    [TR]
    [TD]NE00022[/TD]
    [TD]LSHR[/TD]
    [TD]36.5[/TD]
    [TD]12/12/2015[/TD]
    [TD]default[/TD]
    [/TR]
    [TR]
    [TD]NE00058[/TD]
    [TD]LSHR[/TD]
    [TD]45[/TD]
    [TD]01/17/2016[/TD]
    [TD]default[/TD]
    [/TR]
    [/TABLE]

    when the file is saved, it adds a trailing space to the PAYCODE entries so ‘LSHR’ becomes ‘LSHR ‘

    Anyone come across this previously?
    thanks

    Viewing 0 reply threads
    Author
    Replies
    • #1549929

      As a CSV, the fields should be enclosed in quotes, e.g. “LSHR “. Is this what you see?
      Do you have a further column in the spreadsheet that contains a space?

      cheers, Paul

      • #1549950

        Thanks Paul No there is no column with a space in it..however, I have just managed to solve it.
        The problem arises when the formatting of the column is indented and vertical centre.
        I set the formatting to left basic cells and the column now saves as csv without the trailing space.

        bit of a gotcha problem with the formatting dictating the resulting csv output.

        thanks for checking Paul.

    Viewing 0 reply threads
    Reply To: Reply #1549950 in Save as csv creates trailing space

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel