Why can't I Export selected cells to tab-delimited text file?

This should be an easy thing to do.

I'd like to set up a "refreshable" text export, in much the same way that
you can set up a "refreshable" text import.

Maybe I'm missing something, but it seems that Excel has little in the way
of Export capability.

Yes, I know there is a slightly more cumbersome way of doing this:
copy - open text file - paste - close text file - click "yes" in save
dialog.

Lisa B.
0
11/28/2005 4:01:08 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
724 Views

Similar Articles

[PageSpeed] 6

This macro is fairly simple to implement:

    Public Sub ExportSelectionAsDelimitedFile()
        Const sDELIM As String = vbTab
        Const sPATH As String = "<your path here>"
        Const sFILENAME As String = "test.txt"
        Dim rArea As Range
        Dim rRow As Range
        Dim rCell As Range
        Dim nFile As Long
        Dim sRow As String
        If TypeOf Selection Is Range Then
            nFile = FreeFile
            Open sPATH & sFILENAME For Output As nFile
            For Each rArea In Selection.Areas
                For Each rRow In rArea.Rows
                    sRow = ""
                    For Each rCell In rRow.Cells
                        sRow = sRow & sDELIM & rCell.Text
                    Next rCell
                    Print #nFile, Mid(sRow, Len(sDELIM) + 1)
                Next rRow
            Next rArea
            Close #nFile
        End If
    End Sub


In article <438b2939$0$29928$c3e8da3@news.astraweb.com>,
 "Lisa B." <lucky_lisa@nospam.net> wrote:

> This should be an easy thing to do.
> 
> I'd like to set up a "refreshable" text export, in much the same way that
> you can set up a "refreshable" text import.
> 
> Maybe I'm missing something, but it seems that Excel has little in the way
> of Export capability.
> 
> Yes, I know there is a slightly more cumbersome way of doing this:
> copy - open text file - paste - close text file - click "yes" in save
> dialog.
> 
> Lisa B.
0
jemcgimpsey (6723)
11/28/2005 5:03:07 PM
Don't know if this would help, but another option might be:
File | Save as Web page...
Then check "Selection"

Not quite a "Tab-delimited" file, but it may give you some other ideas to 
work with.
Not sure, but there is also Data | Import external data...  Perhaps you can 
point to your data here.

-- 
Dana DeLouis
Win XP & Office 2003


"JE McGimpsey" <jemcgimpsey@mvps.org> wrote in message 
news:jemcgimpsey-B879BE.10030728112005@msnews.microsoft.com...
> This macro is fairly simple to implement:
>
>    Public Sub ExportSelectionAsDelimitedFile()
>        Const sDELIM As String = vbTab
>        Const sPATH As String = "<your path here>"
>        Const sFILENAME As String = "test.txt"
>        Dim rArea As Range
>        Dim rRow As Range
>        Dim rCell As Range
>        Dim nFile As Long
>        Dim sRow As String
>        If TypeOf Selection Is Range Then
>            nFile = FreeFile
>            Open sPATH & sFILENAME For Output As nFile
>            For Each rArea In Selection.Areas
>                For Each rRow In rArea.Rows
>                    sRow = ""
>                    For Each rCell In rRow.Cells
>                        sRow = sRow & sDELIM & rCell.Text
>                    Next rCell
>                    Print #nFile, Mid(sRow, Len(sDELIM) + 1)
>                Next rRow
>            Next rArea
>            Close #nFile
>        End If
>    End Sub
>
>
> In article <438b2939$0$29928$c3e8da3@news.astraweb.com>,
> "Lisa B." <lucky_lisa@nospam.net> wrote:
>
>> This should be an easy thing to do.
>>
>> I'd like to set up a "refreshable" text export, in much the same way that
>> you can set up a "refreshable" text import.
>>
>> Maybe I'm missing something, but it seems that Excel has little in the 
>> way
>> of Export capability.
>>
>> Yes, I know there is a slightly more cumbersome way of doing this:
>> copy - open text file - paste - close text file - click "yes" in save
>> dialog.
>>
>> Lisa B. 


0
delouis (422)
11/28/2005 5:33:23 PM
Reply:

Similar Artilces:

Inporting data to cell that exceeds the size of the cell.
When I import data to the excel-document that exceed the size of the cell, the cell will expand vertical. I want the text to be horizontal. How can I do that? I use text-boxes for import. When I use the fuction display "full screen" in some of my excel documents, I dont see the full screen. It is problably someting in the setup, but what Can somebody help please? SOSK, Prior to the import, set the column width of the cell that will be receiving the data to be as wide as you want it to be after the import. That will allow Excel to spread the data out rather than expanding the row ...

Contacts export display X400 not SMTP
Hi all, I'm not sure if this behavior is by default or not, but when my users try to export their contacts to an Excel file, any internal (domain) contacts show the X400 address rather than the SMTP address. Is there a way to change this? I've read some about VB scripts with CDO or something, but hoping there is an alternate way. Thanks Mike -- what version Exchange? -- Susan Conkey [MVP] "Mike W." <wallmr_snowpam@gmailDOTC0M> wrote in message news:iQ72h.553254$Pi2.240974@fe08.news.easynews.com... > Hi all, > > I'm not sure if this behavio...

Find cells with conditional formats
Is there an easier way to find the cells with conditional formats than going to each cell and selecting format, conditional formatting? On Aug 28, 9:37=A0pm, mjones <mich...@quality-computing.com> wrote: > Is there an easier way to find the cells with conditional formats than > going to each cell and selecting format, conditional formatting? Found it. It's under Edit, Go To, Special. Thanks. My free "Formats & Styles" Excel add-in provides a count of CF cells that includes a count of cells with multiple conditions. Download from... http://excelusergroup.org/m...

Query and date selection
I test to see if a reservation begins between 11/15-3/31 of any year. So far I have come up with, for the reservation begin date: Between #11/15/2009# And #12/31/2009# Or Between #1/1/2009# And #3/31/2009# This, of course, only tests for 2009. Can I use a year wildcard? Is there a better way? Thanks in advance, -- Chrissy Add Another Field to your query, something like this: monthdayfield: Format([ReservationDate], "mm/dd") And then for the criteria: >="11/15" or <="03/31" I think that will do the trick. You can try a ...

Replacing "*" in a cell
Hi all, Got a quick question, I downloaded my bank statement in txt format. When there is a skip i check number, the bank mark the next check number using "*". Example chk 1011 1013*. I want to get rid of the "*" using 'Replace' but Excel consider it a 'all' so excel replaces all of the value. All I want to do is to change '1013*' to just '1013' without * so I ca sort it by check number. Anyone? Thank you -- Message posted from http://www.ExcelForum.com Hi tinop Use this instead ~* -- Regards Ron de Bruin http://www.rondebruin.nl ...

Export to XML exports single row only
What I did: On XML source panel of Excel 2007 added XML map, mapped to columns using ranges (i. e. A1:A1825), selected “Export” from “Developer” tab in the ribbon. Result: Output XML file contains only one record (first row from the worksheet) I’ve done this numerous times in Excel 2003 with no problem. What happens?? Please help! Thanks, Eugene ...

Restricting entry on tab pages
I have a database for problem reporting, with user-level security in place (test version so far). Each record involves four steps: Problem Description, Response, Follow-up, and Final Approval. I want to make sure that only the person who wrote the Problem Description can edit it; the same for Response, Follow-up, and Final Approval. Each section (step) is on its own page of a tab control. The following function, which I call at the tab controls Change event and at the form's Current event, seems to work, but it seems convoluted. I keep thinking I must be missing something that w...

merging 2 -3 different MS money files into one
hi over a period of testing and doing other things i have created multiple MS Money files mostly with the same accounts and same transactions, the main difference is the transactions that are available in those files, the oldest file has the oldest transactions and newest one has all the new transactions but both contain some common so i want to merge all of them into one so that i can get all transactions from the begining till now. what is the best method to do this. thanks There is no good method. The only method, and not a good one, is File|Export of individual accounts to .QIF ...

Returning the formula in a cell
Hi I have umpteen sheets in my excel, so I think it would be very useful if I could have hyperlinks to each of these sheets on the summary page. Let us say I have, in Sheet 1, Cell A1 the formula "=Sheet2!A2". Lets also say that Cell Sheet2!A2 contains "Hello" In colum 2 (B1), i want to be able to use the HYPERLINK formula - if I click on this cell, it shud take me to Sheet 2 I want to pick up the text "Sheet2!A2" from A1 and not the value returned by "=Sheet2!A2"(which is "Hello"). Which formula would I use to pick up the formula in cel...

Music files using "Package for CD" Option in Powerpoint
I am trying to burn my show onto a disk, and the show has songs linked to it. I know the songs are not embedded into the show, so I was looking for a solution for this. I saw the "package for CD" option in the menu and according to that, it is supposed to take your show, and all linked files and burn it onto a disk to be played back using powerpoint viewer. I made sure the box was checked to include linked files. After the disk burned, no music. I tried putting all the music and show in one folder and then running the package for cd tool, still no music. Is ther...

Selecting Formula
I have set of pre determined formulae. the condition for selecting a particular formula is the number of characters entered in one particular cell. In other words, a formula should select from a table of formula depending upon the characters in the data entry cell. Have tried IF formula, but does not work since nesting IF formula limited to 7. Help Required.. -- forever ------------------------------------------------------------------------ forever's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=28526 View this thread: http://www.excelforum.com/showthread.p...

Export / Import Security
Ok, so I have setup my test environment again. Now I have to create security all over from scratch to define what will be used in production. Is there a way to export from the test environment and then import it into the newly upgraded installation? In both cases security has been/will be completely removed from the 8.0 install (restored on new server) before being upgraded to version 10. Dear, Security will be upgraded upon upgrading GP from GP 8.0 SP5 to GP 10.0. Converting the Security structure from GP 8.0 to 10.0 will not be an easy task. Regards, -- Mohammad R. Daoud MCP, MCBM...

Exporting Sent Email Addresses from Entourage
Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Processor: Power PC Hello! I'm trying to export email addresses from an employee's Entourage, but would like to include email addresses in his "Sent Items" folder. Is there a way to export these email addresses aside from exporting the "MBOX" file, which has all the email content as well? Thanks in advance! On 3/12/08 8:49 AM, in article ee9381d.-1@webcrossing.caR9absDaxw, "Quinlisk@officeformac.com" <Quinlisk@officeformac.com> wrote: > I'm trying to export email addresses from an emplo...

remove chars from cell content
I got part numbers like WGL6068 in a range of coloum. I want to remove GL from the cell and make it W6068. Can anybody help ? Thanks ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ Hi Try using =LEFT(A2,1)&RIGHT(A2,4) in the adjacent cell. You can then autofill this down, copy and paste values. Andy. "itty" <itty.w3ra0@excelforum-nospam.com> wrote in message news:itty.w3ra0@excelforum-nospam.com... > I got part numbers like WGL6068 in a range...

Selecting certain data points on a scatter chart
i need to know how to select certain data points on a scatter graph, s i can create a linear trend line just for those points -- Message posted from http://www.ExcelForum.com Dag See my reply to Larry Campbell's post Peter >-----Original Message----- >i need to know how to select certain data points on a scatter graph, so >i can create a linear trend line just for those points. > > >--- >Message posted from http://www.ExcelForum.com/ > >. > Add those points as a new series. Then, create a trendline for this new series. If these points have some patte...

Control Word Files From Excel
I have been successful in moving data from Excel to Word in VB. From Excel (2003 running on Windows XP Pro) I am able to create several Word files from the same starting Word form. Now, using Excel VB, I need to connect these files into one Word report and have three questions. 1) End of document I need to move the insertion point to the end of the first file before I insert the second file. I’ve recorded a macro in Word and tried the following: WordApp.ActiveDocument.Selection.EndKey Unit:=6 But it does not work. Do you know what will work? Please provide code example...

Format cells with dates
Is there a way to format cells so that dates would change when the lead date is changed. for example, when I input monday's date, tue, wed, thur, etc will follow suit. Pat, Assuming the first date is in A1 B1: =A1+1 C1: =B 1+1 etc. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Pat" <anonymous@discussions.microsoft.com> wrote in message news:115681B0-348E-447E-BB1F-F8347CFDB19B@microsoft.com... > Is there a way to format cells so that dates would change when the lead date is...

How do I link a picture to a text cell
Hi everyone, I must warn you all I am fairly new to excel so please reply in terms a novice would be able to understand, Thanks :) This is what I am trying to achieve: I have a list box with 10 possible selections, lets say for example that 'Apple' was a selection, If I choose 'Apple' I would like a picture of an apple to appear in a different cell range, and if I was to choose 'Pear' I would like the 'Apple' picture to be replaced by a 'Pear' picture. Does this make sense ? :confused: Any help would be much appreciated. Mark...... :) -- Chippy_...

how can I get Outlook (not Outlook Express) to be used to send files from my computer
How can I get Outlook (not Outlook Express) to be used to send files from my computer? I've just started using my new Compaq Presario 3000 laptop running XP Home. Each time that try to send a file by right clicking on it and selecting Mail Reciepient the mail is sent via Outlook Express and not Outlook. THis is a problem for me as I do niot use Outlook Express for anything but Newsgroup reading. The other problem is that I want a record of having sent the file in my Outlook Sent Mail folder. On my old computer the files went through Outlook and not Outlook Express I've checked th...

Export item ID?
Hi there. Having resolved my previous EMS Data import issues, I have now moved on to more complicated things (importing supplier lists, aliases etc). However, these operations require the item ID for each item - something I don't have. Is there some way I can export these from the database so I know what item ID corresponds to each item. I have run a query in Administrator (select itemlookupcode, ID from item) which tells me this, but I haven't worked out how to export this out to a spreadsheet. Any help would be appreciated, cheers After running your query goto File menu and Export....

How to select one record of each from a column
Hello, I have a large worksheet with data. Here are the columns (a,b & c): Order # Employee Hrs. 1000 Mike 2 2000 Mike 1 1000 Paul 2 3000 Rose 3 8000 Mike 1 3000 Mike 2 1000 Rose 1 4000 Paul 1 7000 Jhon 3 5000 Rose 2 1000 Jhon 3 6000 Mike 1 9000 Mike 3 1000 Mike 2 Is there a formula to select only one of each record on "Order #" (column a) and put them on another column (column d)??? Once the formula is created, column d should look like this: 1000 2000 3000 4000 5000 6000 7000 8000 9000 Help please!!! Th...

Edit Box Accepts Tab as Enter
How can you stop the Tab key being used to accept data entry in a multi-line, want return Edit Box on a MFC dialog. Note the event on the Edit Box is OnEnKillfocusEdit1. Graham, You could try deriving your own class from CEdit, and adding OnGetDlgCode (handling, not surprisingly, WM_GETDLGCODE). Here, you can return DLGC_WANTTAB (or you might perhaps want to return DLGC_WANTALLKEYS) Johan Rosengren Abstrakt Mekanik AB "Graham" <anonymous@discussions.microsoft.com> skrev i meddelandet news:047A94A0-A8A5-4640-88ED-B68F60FD9CB7@microsoft.com... > How can you stop the Tab ...

Exporting email in Outlook Express
I am unable to export all emails in Outlook Express. First it had an error message mentioning MAPI so i followed the instructions on Microsoft Knowledge Base to install Windows Messaging - now when i try to export the following error message is: MAPISP32 caused an invalid page fault in module KERNEL32.DLL at 0187:bff7b9a6. Does anyone know what this means? tania jackson <tania@realtime-bs.com> wrote: > I am unable to export all emails in Outlook Express. Ask in an Outlook Express newsgroup. -- Brian Tillman Smiths Aerospace 3290 Patterson Ave. SE, MS 1B3 Grand Rapid...

Exporting to Powerpoint
I have a small table in Excel that I am trying to export to PowerPoint, for some inexplicable reason one column was always missing even though it was specified in the range which the Macro is supposed to export. My manager is the only was able to see the value in that column and no other can replicate his success. Do you know any reason for this? We are all looking at the exact same file, why could he see something that the rest of us cannot? Tao, Why don't you simply copy and paste the whole table into a Powerpoin slide? Joh -- Message posted from http://www.ExcelForum.com...

Splitting 1 cell w/2 words into 2 separate cells
Hey everyone! I have a listing of fantasy football players listed as (Firstname Lastname) in one cell. How can I split them up, so the first name is in one cell, and the last name in another? I need this so I can then sort by last name. Thank you! Gary Gary, Select the column, then use Data - Text to columns. Specify a space as the delimiter. Ensure that the next column is currently empty first. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Gary Hopkins" <garyh@somewhereoutthere.com> wrote in message news:41...