Re: ADO with Excel using .csv? (VB6-Pro)



"Daniel Crichton" <msnews@xxxxxxxxxxxxxxxxxx> wrote in message
news:OU3LZ2DuFHA.2076@xxxxxxxxxxxxxxxxxxxxxxx
> Is there any reason why you're using the Excel driver instead of the Text
> driver? The Text driver is designed to read CSV and formatted text files.
> If you're just trying to read the data in a recordset and then do
> something with, the Text driver should handle it. There's a short example
> at http://www.vb-helper.com/howto_ado_load_csv.html
>
> Dan

Hi, Dan. Yes, of course there is a reason or I wouldn't waste my and others
time<g>. The text driver won't handle the .csv file properly due to type
mismatch in the csv columns, commas in a field in the raw .csv file that is
only comma delimited, and more. It takes a lot of parsing to make it all
come out right, but Excel will indeed do it. I needed to get it into Excel
so I could save it as a .xls, which ADO can easily move into an Access db
and I can then do typecasting myself, that Access needs, upon known cell
types in the code doing that ADO. Already had the ADO part done, just had an
error in the connection string that was pointed out in the
microsoft.public.vb.database.ado forum. I've got it all figured out now,
thanks, see it all in that forum.


.



Relevant Pages

  • Re: Alpha 5 to MS Access 2002
    ... Well, you can't convert the code, or forms or interface. ... to Excel, or even a csv file. ... odbc driver that you can download for free. ...
    (microsoft.public.access.externaldata)
  • Re: Visio and IT use
    ... part of the reason I never un-installed it ... is it possible to import data from excel, csv etc. to recreate my ...
    (microsoft.public.visio.general)
  • Re: Importing text problems
    ... Of cource I can NAME it back to .CSV after I have finished using it, ... use it in Excel. ... >> The reason why I need to do so is because one of the column in the CSV ...
    (microsoft.public.excel)
  • Re: convert number to text without losing zeroes
    ... I am not opening the .csv file.. ... I believe excel brings each item in as a custom format if it is all numbers, ... in Excel converting it to a number and dropping the zero. ...
    (microsoft.public.excel.misc)
  • Re: convert number to text without losing zeroes
    ... use a custom format of 000000, then those leading zeros are preserved when excel ... saves the file as a .CSV file. ... treated as a number but retains the zero. ...
    (microsoft.public.excel.misc)