PC Review


Reply
Thread Tools Rate Thread

CSV Import Error

 
 
Erick C
Guest
Posts: n/a
 
      26th Jan 2010
Hi everybody.
I am having a problem with a CSV file that I am tryingto import. I
have some code that is used to bring up a window so the user can
select a file to import. The only problem is it is written for use
with xls files.
I now need to import CSV files and I was trying to use the same code.
I am getting an error that says "External table is not in the expected
format"
and the debugger highlights:
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _
strTable, strPathFile, blnHasFieldNames
I think that it is the "acSpreadsheetTypeExcel9" that is giving me
problems, but I do not know what to update it to in order for it to
bring in CSV rather than xls. I know that the number represents
different versions of excel, but I do not know if there is a
designation for csv files as well. Can anybody help me out?

Thanks!
Erick
 
Reply With Quote
 
 
 
 
pietlinden@hotmail.com
Guest
Posts: n/a
 
      27th Jan 2010
On Jan 26, 3:34*pm, Erick C <boricua2...@gmail.com> wrote:
> Hi everybody.
> I am having a problem with a CSV file that I am tryingto import. *I
> have some code that is used to bring up a window so the user can
> select a file to import. *The only problem is it is written for use
> with xls files.
> I now need to import CSV files and I was trying to use the same code.
> I am getting an error that says "External table is not in the expected
> format"
> and the debugger highlights:
> DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _
> * * * strTable, strPathFile, blnHasFieldNames
> I think that it is the "acSpreadsheetTypeExcel9" that is giving me
> problems, but I do not know what to update it to in order for it to
> bring in CSV rather than xls. *I know that the number represents
> different versions of excel, but I do not know if there is a
> designation for csv files as well. *Can anybody help me out?
>
> Thanks!
> Erick


You need to use TransferText with CSV files, not TransferSpreadsheet.
 
Reply With Quote
 
Erick C
Guest
Posts: n/a
 
      27th Jan 2010
TransferText!!!
Of course I need to use that! Thank you!
It always makes so much more sense once someone points out the most
obvious things to me! Hopefully I can learn this vba and sql stuff a
little more quickly.

Thanks again!


On Jan 26, 9:55*pm, "pietlin...@hotmail.com" <pietlin...@hotmail.com>
wrote:
> On Jan 26, 3:34*pm, Erick C <boricua2...@gmail.com> wrote:
>
>
>
>
>
> > Hi everybody.
> > I am having a problem with a CSV file that I am tryingto import. *I
> > have some code that is used to bring up a window so the user can
> > select a file to import. *The only problem is it is written for use
> > with xls files.
> > I now need to import CSV files and I was trying to use the same code.
> > I am getting an error that says "External table is not in the expected
> > format"
> > and the debugger highlights:
> > DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _
> > * * * strTable, strPathFile, blnHasFieldNames
> > I think that it is the "acSpreadsheetTypeExcel9" that is giving me
> > problems, but I do not know what to update it to in order for it to
> > bring in CSV rather than xls. *I know that the number represents
> > different versions of excel, but I do not know if there is a
> > designation for csv files as well. *Can anybody help me out?

>
> > Thanks!
> > Erick

>
> You need to use TransferText with CSV files, not TransferSpreadsheet.- Hide quoted text -
>
> - Show quoted text -


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
import csv conversion & import spec error Maver1ck666 Microsoft Access External Data 1 21st Aug 2009 02:44 PM
An error occurred trying to import file 'c:\temp\import.txt'. The file was not imported. M Skabialka Microsoft Access 0 13th Jan 2009 05:32 PM
not getting Import Error table when import .xls to a LimitToList f =?Utf-8?B?dHhtZXhtaXNzeQ==?= Microsoft Access External Data 0 22nd Mar 2006 09:42 PM
Switchboard / macro import / Error if import fails? =?Utf-8?B?QW5uIFNjaGFycGY=?= Microsoft Frontpage 1 13th Dec 2005 09:41 AM
error message 'an error occured saving import/export specification =?Utf-8?B?VEJBVEVM?= Microsoft Access External Data 1 15th Sep 2005 06:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:12 AM.