+ Reply to Thread
Results 1 to 3 of 3

Saving selected Excel data into notepad.csv

  1. #1
    Registered User
    Join Date
    07-06-2014
    Location
    Australia
    MS-Off Ver
    Excel
    Posts
    2

    Saving selected Excel data into notepad.csv

    Saving selected Excel data into Notepad.csv
    I’m sure I did this before successfully but now I’ve lost it entirely.
    I select an excel data/array of 5 lines, 5 columns, say F21:J25 . I then copy/paste the data onto a new w/sheet and sort so that only 3 lines A1:C5 are populated. I then select and save the sorted data as a CSV (comma delimited) at a different location. I choose to save only the active sheet and when reminded that the destination doc may contain features that are not compatible, I choose to keep the format leaving out any incompatible features (mind you if I choose to preserve the features I get the same result). Instead of 3 rows of comma separated data I get a notepad file with my sorted data on the first 3 lines with columns A & B separated nicely by commas, column C with an unwanted space either side of it, columns D and E separated nicely by a comma BUT each of the 3 lines finishing with 5 unwanted commas and lines 4 to 15 (12 of them) each containing a row of 9 commas. All very confusing. I would attach an image but I cant see how to do that.
    Any help appreciated.
    Attached Images Attached Images

  2. #2
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Saving selected Excel data into notepad.csv

    Hi,

    Welcome to the Forum.

    When you 'Save As' an excel file in CSV (Comma Delimited) format, only the ACTIVE sheet gets saved in CSV format leaving out all formatting and other objects etc, if any. However, if you save the file in 'Text Tab Delimited' format, the file would be saved as a notepad file.

  3. #3
    Registered User
    Join Date
    07-06-2014
    Location
    Australia
    MS-Off Ver
    Excel
    Posts
    2

    Re: Saving selected Excel data into notepad.csv

    Hi and thanks for your welcome.
    Sorry but I still have no solution. Perhaps I can put it more clearly.
    If I open up a new workbook and enter the same data that I am trying to copy from another workbook/sheet, I can achieve a successful outcome. Select the data/Paste to another sheet at A1 ('All' or 'Values' doesn't matter)/Sort the data so that populated lines go to the top/Select the data/Save As a CSV (comma delimited) doc. Great result, separate lines, no spaces, commas in the right places.
    Now when I follow the same procedure in my active workbook I end up with a notepad csv doc as described earlier, lots of extra commas, unwanted spaces etc.
    The only difference I can point to is that I am copying data which has been generated by formulas although when I paste it onto a new sheet for sorting and final saving, I can use Paste Special/Values but still get the same screwed up results.
    Maybe there is another route I can follow to get the desired outcome.
    Thanks for any guidance.

+ 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. [SOLVED] Saving Textbox value to a notepad (VBA)
    By nathan0519 in forum Excel General
    Replies: 7
    Last Post: 07-09-2014, 08:28 PM
  2. VBA Code for Exporting Selected Columns in Excel to Notepad
    By xace in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2014, 03:01 AM
  3. how to copy selected notepad text and paste it in other notepad with macro
    By Guru232 in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 04-24-2013, 04:43 AM
  4. Saving workbook as notepad using cell data for filename & retaining original workbook name
    By peterkerr_13 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2012, 08:07 AM
  5. Saving Notepad from VBA
    By ricardodickstein in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-06-2009, 11:18 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