Re: Pls Hlp! How to convert a .xls file to .txt file in Access / V

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: raj (raj_at_discussions.microsoft.com)
Date: 11/22/04


Date: Sun, 21 Nov 2004 22:49:03 -0800


 oops sorry it doesn'twork. I 'm loading the wrong file. (Tab delimitted text
file).

Yes I have specified the "acExportDelim" but still the result is same.

This is my code:

DoCmd.TransferSpreadsheet acLink, acSpreadsheetTypeExcel9,
TableName:=XLSfileName,
fileName:="\\melapp01\RMO\Data\AAPTACT\Customers\AAPT-DATA-FINAL.xls",
hasfieldnames:=True
    
    'converted to an csv file
    DoCmd.TransferText acExportDelim, TableName:=XLSfileName,
fileName:="\\melapp01\RMO\Data\AAPTACT\Customers\" & XLSfileName & ".txt",
hasfieldnames:=True
    
    newTextFileName = XLSfileName & ".txt"

"Douglas J. Steele" wrote:

> Did you specify acExportDelim as the type of transfer? I believe you need to
> create a schema file using the text import/export wizard, and then provide
> the name of as the specification file argument.
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
>
>
>
> "raj" <raj@discussions.microsoft.com> wrote in message
> news:B336A1E0-36A1-4399-A2BD-A090EAB09B5B@microsoft.com...
> > HI Douglas
> >
> > When I transfer the text file is created. But it is a mess. I want to
> > delimit the text file as a tab delimited. How can I do this in the
> > TextTransfer method.
> >
> > raj
> >
> > "Douglas J. Steele" wrote:
> >
> > > Well, whether or not you can do it depends on the nature of the
> spreadsheet.
> > > If you can, though, you can manually link through File | Get External
> Data |
> > > Link Tables. Change the Files Of Type at the bottom left to Excel Files
> and
> > > let the wizard help you. If you don't have a Files Of Type value for
> Excel,
> > > look for msexcl35.dll on your hard drive (should be in the System
> folder) if
> > > you're using Access 97, or msexcl36.dll if you're using Access 2000 or
> newer
> > > and use regsvr32.exe to reregister it.
> > >
> > > You can also link programmatically using the TransferSpreadsheet method.
> > >
> > > --
> > > Doug Steele, Microsoft Access MVP
> > > http://I.Am/DougSteele
> > > (no e-mails, please!)
> > >
> > >
> > >
> > > "raj" <raj@discussions.microsoft.com> wrote in message
> > > news:57FE037F-8055-4ECF-BA0D-6B128BC62AA1@microsoft.com...
> > > > Hi Douglas
> > > > Could you please explain me a bit more about linking my spread sheet
> to so
> > > > that it appears as
> > > > a linked table to Access
> > > >
> > > > raj
> > > >
> > > > "Douglas J. Steele" wrote:
> > > >
> > > > > Simplest approach would be to link to the spreadsheet so that it
> appears
> > > as
> > > > > a linked table to Access. Then, you can use TransferText to convert
> it
> > > to a
> > > > > ..txt file.
> > > > >
> > > > > --
> > > > > Doug Steele, Microsoft Access MVP
> > > > > http://I.Am/DougSteele
> > > > > (no e-mails, please!)
> > > > >
> > > > >
> > > > >
> > > > > "raj" <raj@discussions.microsoft.com> wrote in message
> > > > > news:9A87082A-217F-4526-8AB1-DA4FDD58DA51@microsoft.com...
> > > > > > I have a Access database application written in VB. In the code, I
> > > > > have.xls
> > > > > > file that I need to convert it to .txt file. How should I do this
> in
> > > the
> > > > > > code. I greatly appreciate any ideas.
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > raj
> > > > >
> > > > >
> > > > >
> > >
> > >
> > >
>
>
>



Relevant Pages

  • Re: End of Class 60?
    ... Talbot to Llanwern iron ore. ... the loading the same? ...
    (uk.railway)
  • Re: Download my @r5E
    ... > Four attempts at overnight downloads of erdora (oops, ... > Fedora). ... > Two failed after loading something like 98%. ...
    (alt.os.linux.redhat)
  • Re: [2.6.0-test-x] Kernel Oops and pppd segfault
    ... > This should fix the oops, but the failure is still strange. ... > do you already have a ppp device in /dev before loading the module? ... Yeah, I posted this problem a few weeks ago but never had an answer. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Oops with cpufreq on 2.6.5-mm1
    ... >cpufreq make an Oops on loading. ... I have attached the oops. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)