+ Reply to Thread
Results 1 to 13 of 13

CSV file export - a crazy thing happens ... for no reason!

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    53

    Question CSV file export - a crazy thing happens ... for no reason!

    Well, just take a look at the attached csv file. I have the following freaky question:

    Why when I open it with Wordpad it gives the following:

    Please Login or Register  to view this content.
    And with notepad it gives
    Please Login or Register  to view this content.

    Apparently this is quite a good reason for the import/export capabilities of my excel tool not to work.
    Really, does anyone have an explanation why it is like this (question 1) and how to make a code that exports a thing like this in two different formats (question 2)... Readable like one line csv, if opened in Notepad and manylines if opened in Notepad...?

    Anyway, have a great day!

    Regards

    PS. No SCV file is attached, but you can just copy+paste the code and you will understand what I mean. Hopefully.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,382

    Re: CSV file export - a crazy thing happens ... for no reason!

    1st guess would be some difference between the "text wrap" or "word wrap" settings between Notepad and Wordpad. In each application, check the text wrap setting and make sure it is turned off.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    11-07-2012
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: CSV file export - a crazy thing happens ... for no reason!

    Nope... It is not that.
    Anyway, give another try & help me with the deadline

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

    Re: CSV file export - a crazy thing happens ... for no reason!

    Where exactly are we supposed to copy and paste the data?

    Also, how should we export as CSV?
    If posting code please use code tags, see here.

  5. #5
    Registered User
    Join Date
    11-07-2012
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: CSV file export - a crazy thing happens ... for no reason!

    Well, it is an VBA excel file, which exports in csv through a marcro.
    And the export file cannot be processed later, because of this strange issue.
    I have one file as an example, which can be processed. I have taken a look at the file, trying to imitate it, and the issue is that:
    - if I open it with Wordpad, it gives the first thing.
    - if I open it with Notepad, it gives the second one.

    And I really have no clue how to do such a file. For me it is something strange...

    (I hope you understood me)

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644
    What does it matter how the file appears in WordPad or Notepad?

    What are you doing with the CSV and how isn't it working?

  7. #7
    Registered User
    Join Date
    11-07-2012
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: CSV file export - a crazy thing happens ... for no reason!

    What does it matter how the file appears in WordPad or Notepad?
    It matters, because this is the only difference that I find between the working and the non working file.
    The working file appears as I have shown, and the not working file appears the same in the two versions.

    What are you doing with the CSV and how isn't it working?
    The CSV is uploaded in some other program by another department. I have no idea how it is not working. They've just told me it does not work.

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

    Re: CSV file export - a crazy thing happens ... for no reason!

    In the first post you said it was one file.

    If it's two what's different about the way you create them?

  9. #9
    Registered User
    Join Date
    11-07-2012
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: CSV file export - a crazy thing happens ... for no reason!

    It is one file - the working one, which if I open it with Notepad and with Wordpad gives different things.

    There is one not working one, which gives the same results - and I want to understand whether someone has seen something strange as this or I should speak tomorrow with the colleagues once again.

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

    Re: CSV file export - a crazy thing happens ... for no reason!

    So there is a file that works but just looks a bit different when you open it in different applications?

  11. #11
    Registered User
    Join Date
    11-07-2012
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: CSV file export - a crazy thing happens ... for no reason!

    Exactly. It looks the way I have described it in the first post

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

    Re: CSV file export - a crazy thing happens ... for no reason!

    I'm getting confused here - is there actually a problem?

  13. #13
    Registered User
    Join Date
    11-07-2012
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: CSV file export - a crazy thing happens ... for no reason!

    Anyway, I will speak with the colleagues again, maybe there is a misunderstanding somewhere, cos it really seems meaningless to work this way.
    In the meantime I have a new CSV issue => you can check that out.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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