Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8407913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:30:04+00:00 2026-06-09T23:30:04+00:00

I would like to generate a Tab Delimited file from excel (using a formula

  • 0

I would like to generate a Tab Delimited file from excel (using a formula to setup the string)
the reason that i dont want to use the save as function is that i will be generating many different csv/txt files from the one spreadsheet and when you save, the extension of the main file is changed.

this is what i have in Excel, the function must concatenate all columns with tabs in the middle, the Desc field must be encapsulated in double quotes.

enter image description here

when i copy the contents of cell D2 into a text editor returns the following string

“Toyota Corrola “”desc here”””

as you can see Excel decides to place double quotes into the entire string and escapes the original quotes…

Is there any way to fix this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:30:05+00:00Added an answer on June 9, 2026 at 11:30 pm

    Although the Excel tab delimited export works perfectly, I needed a Tab Delimited file to be generated on a selection, as fast as possible.

    Found/Edited the code below and assigned an Excel Macro Shortcut to it:

        Sub QuoteCommaExport()
        Dim DestFile As String
        Dim FileNum As Integer
        Dim ColumnCount As Integer
        Dim RowCount As Integer
    
        ' Prompt user for destination file name.
        DestFile = InputBox("Enter the destination filename" & _
          Chr(10) & "(with complete path and extension):", _
          "Quote-Comma Exporter", "C:\myTabFile.txt")
        ' Obtain next free file handle number.
        FileNum = FreeFile()
    
        ' Turn error checking off.
        On Error Resume Next
    
        ' Attempt to open destination file for output.
        Open DestFile For Output As #FileNum
        ' If an error occurs report it and end.
        If Err <> 0 Then
          MsgBox "Cannot open filename " & DestFile
          End
        End If
    
        ' Turn error checking on.
        On Error GoTo 0
    
        Dim topString
        For ColumnCount = 1 To Selection.Columns.Count
    
            If ColumnCount < Selection.Columns.Count Then
                topString = topString & """" & ActiveSheet.Cells(ColumnCount, 1).Text & """" & vbTab
                Else
                topString = topString & """" & ActiveSheet.Cells(ColumnCount, 1).Text & """"
            End If
        Next ColumnCount
        Print #FileNum, topString
    
        ' Loop for each row in selection.
        For RowCount = 1 To Selection.Rows.Count
          ' Loop for each column in selection.
          For ColumnCount = 1 To Selection.Columns.Count
    
             ' Write current cell's text to file with quotation marks.
             Print #FileNum, """" & Selection.Cells(RowCount, _
                ColumnCount).Text & """";
             ' Check if cell is in last column.
             If ColumnCount = Selection.Columns.Count Then
                ' If so, then write a blank line.
                Print #FileNum,
             Else
                ' Otherwise, write a comma.
                ' Print #FileNum, ",";
                  Print #FileNum, vbTab;
             End If
          ' Start next iteration of ColumnCount loop.
          Next ColumnCount
        ' Start next iteration of RowCount loop.
        Next RowCount
    
        ' Close destination file.
        Close #FileNum
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a function that I would like to generate random strings from
I would like to save my CSV file as unicode by using Excel. I
I would like to generate a patch with all commits from a local branch.
I would like to generate the mysql-password hash from js. I know the method
I would like to generate a regex for a string like S67-90. I used
I would like to generate on-the-fly word documents from a template and a XML
I would like to generate funnel chart on my web page. I am using
I would like to generate a list of all the files that have been
I would like to generate POJO, XML for a given database. Database: ( contents
i would like to generate a very simple report with some images and text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.