+ Reply to Thread
Results 1 to 3 of 3

Export data to txt file/new sheet (selected header)

  1. #1
    Registered User
    Join Date
    07-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    2

    Export data to txt file/new sheet (selected header)

    Hi,

    I like to know how can I export the excel data on the attachement to txt delimited but I only need some data from there.

    text data header will be

    Name Code Unit Price Detail.Description Detail.Stockqty Discount

    Name Code = e3 (column)
    unit price = h10 (column)

    detail.description =c11&" "&b11&" "&d11 (column)

    detail.stockqty = m10 (column)

    discount = b4

    after running the script, it will create a new sheet so that i can just save it into delimited txt using "save as"

    Thanks

    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Export data to txt file/new sheet (selected header)

    for now try this
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Export data to txt file/new sheet (selected header)

    Thanks for the code,
    Manage to get it working and also edited some code to suit my txt file.

    I like to check also

    NameCode UnitPrice Detail.Description Detail.StockQty Discount

    how to i create a TAB delimiter?

    Print #FileNum, Cells(3, 5).Text & " " & Cells(RowCount, 8).Text & " " & Cells(RowCount, 3).Text & " " & Cells(RowCount, 2).Text & " " & Cells(RowCount, 4).Text
    any symbol to use as i try pressing "TAB" but after it save to text file (import to excel back I need to use "SPACE" as delimiter instead of Tab

    Can I add my own header into the text file?

    Header1 Header2 Header3 Header4 Header5 (each with a tab delimiter)

    ---------- Post added at 04:02 PM ---------- Previous post was at 03:55 PM ----------

    Please Login or Register  to view this content.
    I edited the code but after i save it to txt file, I can't import to excel in tab delimiter or space delimiter function

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Export data to txt file/new sheet (selected header)

    You can substitute " " with ","

+ 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