Saving Tab Delimited - Without quotes!

SuperFerret

Well-known Member
Joined
Mar 2, 2009
Messages
515
Hello!

I'm having some issues with understanding this:
http://support.microsoft.com/kb/104997

Basically, we have to edit some description data to import into another system and save it as a Text (Tab Delimited) file. However, when we come to open it, it has entered " around the text (which crashes the system and causes all kinds of problems) :mad:

I've tried to understand the Microsoft support page but don't know if this is the best approach. Is there a better Macro I could use?

Ideally I want to add this to a couple of peoples QAT's so they can press it to save their documents, but don't know where to start! I want to allow the user to specify where to save it and give it a filename but not to put the " in.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Anyone?

I've tried creating the Macro off the site but it doesn't appear to have instructions for 2007.
 
Upvote 0
  1. A1: TextFile Macro
    A2: =SET.NAME("nextcol",0)
    A3: getname=FOPEN(INPUT("Filename:",2),3)
    A4: =SET.NAME("colcount",COLUMNS(SELECTION()))
    A5: =FOR.CELL("current",SELECTION())
    A6: =IF(AND(ISNUMBER(current),GET.CELL(7,current)<>"General"))
    A7: =FWRITE(getname,TEXT(current,GET.CELL(7,current)))
    A8: =ELSE()
    A9: =FWRITE(getname,current)
    A10: =END.IF()
    A11: =SET.NAME("nextcol",nextcol+1)
    A12: =IF(nextcol=colcount)
    A13: =FWRITE(getname,CHAR(13)&CHAR(10))
    A14: =SET.NAME("nextcol",0)
    A15: =ELSE()
    A16: =FWRITE(getname,CHAR(9))
    A17: =END.IF()
    A18: =NEXT()
    A19: =FCLOSE(getname)
    A20: =RETURN()
  2. Select cell A1, on the Macro sheet.
  3. On the Insert menu, point to Name and click Define. Click the TextFile Macro so that the title appears in the "Names in workbook" box.
  4. In the "Refers to" box, verify the address of the macro is:
    =macrosheetname!$a$1
  5. Under Macro, click Command, and then click OK.
  6. Switch to the sheet that contains the range that you want to export and select that range.
  7. On the Macro menu, click Run. In the Macro dialog box, select the TextFile macro and click OK.
  8. A dialog box will prompt you for a file name, and the file will be written to that name. Name should include the file name extension if needed.

    CAUTION: Any existing files with that same name will be overwritten by the new text file.
It's this one off the Microsoft site, but it only gives instruction for 97 and I'm on 2007. I can't find whereabouts on 07 to do step 3!! Its driving me crazy!
 
Upvote 0

Forum statistics

Threads
1,224,416
Messages
6,178,512
Members
452,853
Latest member
philipnjk64

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top