+ Reply to Thread
Results 1 to 4 of 4

Having to resave a csv file after running a macro

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    Exeter, UK
    MS-Off Ver
    Excel 2003
    Posts
    4

    Having to resave a csv file after running a macro

    Hi all,

    First post, so I really appreciate any help you guys can give.

    I've written a macro, that from one sheet, it makes three csv files and it broadly works fine.

    The three csv files it creates are around 250kb and if you look in notepad, you can see line upon line of commars (where there is no data), if I resave as a csv, the file become 1kb and the commars disappear.

    I was just wondering what Excel does to clean the file up and why when it is initially saved, the file is not in a clean state?

    My code is shown below!


    Thanks,

    John

    Please Login or Register  to view this content.
    Last edited by Cutter; 10-21-2012 at 12:20 PM. Reason: Added code tags

  2. #2
    Registered User
    Join Date
    10-19-2012
    Location
    Exeter, UK
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Having to resave a csv file after running a macro

    I should add, that the three files created will always have different names, so I cannot build another macro to reference the newly created files (as the name will be different.

  3. #3
    Registered User
    Join Date
    10-19-2012
    Location
    Exeter, UK
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Having to resave a csv file after running a macro

    I know this is not good form and not good etiquette, but just bumping this to the top again!

    Thanks and sorry!!

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Having to resave a csv file after running a macro

    @ grecianite

    Welcome to the forum. Bumping is quite alright (within reason - once per day) but:

    Please notice that [CODE] tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at the top of the page and read Rule #3.
    Thanks.

+ 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