+ Reply to Thread
Results 1 to 7 of 7

Save Excel file as Tab-delimited text without quotes

  1. #1
    Registered User
    Join Date
    01-31-2010
    Location
    Missoula, MT
    MS-Off Ver
    Excel 2007
    Posts
    15

    Save Excel file as Tab-delimited text without quotes

    I need to save a file as a Tab-delimited text file and as you may be aware any fields that contain punctuation (line breaks, quotes, commas and periods) are saved by Excel with quote marks around the contents. There is no way to disable this function.

    I need the file to be saved without these quote marks.

    I found this VBA script that supposedly will save Excel spreadsheets as txt files without these added quote marks:

    Please Login or Register  to view this content.
    Unfortunately when I run the script I get an error-
    "Run-time error '13':
    Type mismatch"

    on the line:

    file.WriteLine Join(WorksheetFunction.Index(arr, r), vbTab)

    Any help would be greatly appreciated!
    Last edited by markjh; 10-06-2010 at 12:00 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,324

    Re: Save Excel file as Tab-delimited text without quotes

    Hi markjh
    the code looks and runs fine, whats in the workbook?

  3. #3
    Registered User
    Join Date
    01-31-2010
    Location
    Missoula, MT
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Save Excel file as Tab-delimited text without quotes

    The workbook is a product list for uploading to Bing Shopping. It contains product ID's, titles, descriptions, prices, shipping costs, product categories, brand, URLs and inventory status. Bing requires that the file be uploaded as a Tab-delimited text file, in UTF-8 format and with NO surrounding quote marks (ones within fields are ok).

    It is a single page, 13 columns and 472 lines, including a header row.

    With the exception of the headers, the cells are filled using references to another workbook (my master pricelist).

    I tried copying the workbook and pasting on itself using the "Paste Special: Values" command to see if it was the cell references that were causing the problem, I still get a "Type mismatch" error.

    Thanks for looking at this for me. Would it help if I posted the spreadsheet?

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,324

    Re: Save Excel file as Tab-delimited text without quotes

    markjh
    can you attach a sample workbook?

  5. #5
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,324

    Re: Save Excel file as Tab-delimited text without quotes

    or possible once you have the text file then saveas and select as UTF-8

  6. #6
    Registered User
    Join Date
    01-31-2010
    Location
    Missoula, MT
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Save Excel file as Tab-delimited text without quotes

    Here is the file with most of the records removed.

    Mark
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-31-2010
    Location
    Missoula, MT
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Save Excel file as Tab-delimited text without quotes

    I think it is solved. This script actually worked, and seems to do what I need:

    Please Login or Register  to view this content.
    Maybe fixed?

+ 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