+ Reply to Thread
Results 1 to 8 of 8

Excel Macro to create Header and lines and save with Pipe CSV format

  1. #1
    Registered User
    Join Date
    11-21-2017
    Location
    SYDNEY
    MS-Off Ver
    2016
    Posts
    35

    Excel Macro to create Header and lines and save with Pipe CSV format

    Hello,

    i'm hoping someone can help with this code. i have a standard excel format file that has to be saved as *.csv with '|" pipe delimiter. also each record must have a header and line items. "H" for header and "I" .

    please see sample attached. Please help.

    thanks heaps.
    Attached Files Attached Files
    Last edited by spr2017; 11-04-2018 at 11:02 PM.

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Excel Macro to create Header and lines and save with Pipe CSV format

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Registered User
    Join Date
    11-21-2017
    Location
    SYDNEY
    MS-Off Ver
    2016
    Posts
    35

    Re: Excel Macro to create Header and lines and save with Pipe CSV format

    this is great. however i can we do some formatting on d(1,1) as yyyymmdd? i can put this in this in the excel but will need a separate cell to convert. I really appreciate your help. its perfect.

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Excel Macro to create Header and lines and save with Pipe CSV format

    Thanks for rep.points. Just add the code line in red below :
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-21-2017
    Location
    SYDNEY
    MS-Off Ver
    2016
    Posts
    35

    Re: Excel Macro to create Header and lines and save with Pipe CSV format

    Perfect thanks heaps

  6. #6
    Registered User
    Join Date
    11-21-2017
    Location
    SYDNEY
    MS-Off Ver
    2016
    Posts
    35

    Re: Excel Macro to create Header and lines and save with Pipe CSV format

    Hello Karedog,

    there is a slight change to this file and I've tried making it in this file but was unsuccessful in changing the code. can you please help? I've attached a new version of the file and highlighted the row.

    i get an error on 'z(strKey)(4).Add Array(a(i, 2), a(i, 3), a(i, 7))' I've moved the cols across but not sure why.



    Please Login or Register  to view this content.
    o
    Attached Files Attached Files

  7. #7
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Excel Macro to create Header and lines and save with Pipe CSV format

    It should be :
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    11-21-2017
    Location
    SYDNEY
    MS-Off Ver
    2016
    Posts
    35

    Re: Excel Macro to create Header and lines and save with Pipe CSV format

    thanks heaps.

+ 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] Macro to create txt-file with pipe seperator
    By elgato74 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-27-2017, 09:22 AM
  2. Macro needed to save file in pipe delimited format
    By Blaked86 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2014, 09:04 AM
  3. Macro to open multiple files, remove header and save multiple files in a new format
    By twocircles in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2014, 05:24 PM
  4. Combine Excel Sheets (+2 Million Rows total) and Create Pipe Delimited TEXT File
    By kestefon in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-05-2013, 08:51 PM
  5. need macro to create pipe delimited text file from excel
    By nefkho in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2012, 12:03 PM
  6. How to save an excel in a pipe delimited format?
    By princesouvik in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-08-2009, 03:13 AM
  7. Replies: 5
    Last Post: 05-25-2006, 03:40 PM

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