+ Reply to Thread
Results 1 to 15 of 15

Excel .csv import assigning to column problem

  1. #1
    Registered User
    Join Date
    09-23-2012
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    23

    Excel .csv import assigning to column problem

    Hi,
    using Excel 2003, when I import this .csv as .txt, so to get the import wizard, one field makes trouble, not accepting the content as coherent content of the cell and creates new rows in the excel sheet where there is a space in that content ... how can I avoid this behavior and receive the content for that column kept together in the wanted target cell ?

    At the yellow spots in the examples below i have exchanged such content with an “x” and it works there, at the blue marked spots i left it as it originally is:

    .txt:
    2013_05_27_17_19_29.jpg

    Import wizard:
    2013_05_27_17_20_25.jpg

    Excel sheet :
    2013_05_27_17_15_44.jpg

    Please share.
    Best regards,
    Frank

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Excel .csv import assigning to column problem

    Frank

    The problem could be caused by a rogue non-printing character.

    Hard to tell from images though.

    Can you upload an example file?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    09-23-2012
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Excel .csv import assigning to column problem

    thank you for your reply. i tried to attach it, but it doesn't allow me to drag the uploaded file to the attachment area 2013_05_27_18_02_07.jpg, anyhow, here is a link to the b.txt file
    Attached Images Attached Images

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Excel .csv import assigning to column problem

    Frank

    You can only drag files you have previously uploaded.

    To upload a file from your computer, from the Mahange Attachments window:
    1. Click Add Files.
    2. Select Files.
    3. Navigate to and select the file(s) you want to upload.
    4. Click OK on the file dialog.
    5. Finally click Upload Files.

  5. #5
    Registered User
    Join Date
    09-23-2012
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Excel .csv import assigning to column problem

    Hey Norie, ya I uploaded the file first (b.txt) but then wasn't able to grab it from the upload window yet http://www.excelforum.com/attachment...3&d=1369670568

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Excel .csv import assigning to column problem

    Frank

    I don't think you are following all the steps I outlined in the previous post.

    Are you definitely clicking Upload Files after selecting the file?

    PS There should be no dragging or grabbing involved.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-23-2012
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Excel .csv import assigning to column problem

    ah now gotit , I didn't hit the upload after pre-selecting the file.
    Attached Files Attached Files

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Excel .csv import assigning to column problem

    Frank

    I can't quite figure out what he problem is but I did come up with this code.
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    09-23-2012
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Excel .csv import assigning to column problem

    thank you very much for the code. As far as I can understand, i've put it in a macro and ran it, but i'm getting an error. Is this the way to do it ?
    Unfortunately I have no knowledge about VBA.

    2013_05_27_22_06_51.jpg

    Regards,
    Frank

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Excel .csv import assigning to column problem

    Frank

    Sorry for getting back to you so late.

    Anyway, what you've done is almost right.

    The only thing you are missing is End Sub which should go after this part of the code. ie at the end of the sub
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    09-23-2012
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Excel .csv import assigning to column problem

    hmp no idea what went wrong right now ... i have the same ending in there 2013_05_28_08_18_02.jpg
    Last edited by Frank1000; 05-28-2013 at 03:33 AM.

  12. #12
    Registered User
    Join Date
    09-23-2012
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Excel .csv import assigning to column problem

    its really wired, because the break happens not to the next cell, but to the next line, and also it breaks in the middle of a word "DAUERAUFTRAGMTL ..." is split to "DAUERAUFTRAG" "MTL ..."

    2013_05_28_22_42_37.jpg

    Have no idea what this can be caused by.
    Last edited by Frank1000; 05-28-2013 at 05:56 PM.

  13. #13
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Excel .csv import assigning to column problem

    Frank

    Are you using the code on the same file you uploaded or another?

  14. #14
    Registered User
    Join Date
    09-23-2012
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Excel .csv import assigning to column problem

    Hey Norie, it is the same file i've created the imports and example-screenshots with. Partly copied down and shortened to the point of failure, to make it light n' easier to dig.
    What was about the macro, why is it not working for me ? Probably overcomes the problem sweetly.

  15. #15
    Registered User
    Join Date
    09-23-2012
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: Excel .csv import assigning to column problem

    Hi,
    in the meantime i found out that there are hidden return functional characters even in the .txt document, where i thought it wouldn't allow for any hidden characters etc. ... but .txt does allow that, and that creates the 1st problem.

    Now I wanted to create a routine where i can import the .csv the way that the 10 columns in there would result in 10 columns in excel and the content of the cells is assigned to the right column, but i was not able to create such a routine.

    Pls share.

    Regards,
    Frank

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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