+ Reply to Thread
Results 1 to 3 of 3

Macro to export to CSV exporting everything as one row...not normal

  1. #1
    Forum Contributor
    Join Date
    02-26-2009
    Location
    Canada
    MS-Off Ver
    Excel 2013
    Posts
    207

    Macro to export to CSV exporting everything as one row...not normal

    I've copied and pasted this macro for a few other excel files. It basically exports the specified sheet as a csv file, and strips out any blank lines. Works great in all my other excel macro enabled files...only in this application its exporting the rows horizontally...so I end up with all rows being converted to one really long single row file. Very odd.

    Thing is it works fine for all other files, and if I copy paste it into this particular sheet I get the export happening as one big row.

    The code looks all good and I'm not sure how its happening. Can we insert anything into the code to prevent this from happening?

    I would attach the sheet but most no-one wants to touch a macro enabled worksheet...

    Thanks!

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro to export to CSV exporting everything as one row...not normal

    Hello unclejemima,

    I have no fear of macro enabled workbooks. Please post a copy.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: Macro to export to CSV exporting everything as one row...not normal

    Looks like the one I wrote.

    Just try change the line
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    If it doesn't work, need to see a small sample csv file.

+ 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: 14
    Last Post: 11-19-2019, 09:17 AM
  2. ways to determine a normal or log normal distribution in excel
    By aprildu in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-29-2016, 06:32 PM
  3. Exporting 240 sheets to PDF, prompt once for export location?
    By molonlabe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-07-2016, 05:18 PM
  4. [SOLVED] Issue in Exporting Report - Getting Different Column Headings For xls / PDF Export
    By :) Sixthsense :) in forum Access Tables & Databases
    Replies: 14
    Last Post: 02-10-2015, 01:21 AM
  5. I would need a macro to export data from base example workbook to export worbook
    By slato8 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2012, 11:21 AM
  6. Replies: 0
    Last Post: 06-22-2012, 11:28 AM
  7. Excel export to access (Not Exporting data)
    By PRodgers4284 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-09-2009, 08:27 AM

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