View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Eric[_12_] Eric[_12_] is offline
external usenet poster
 
Posts: 7
Default Excel data into VB 6.0

Open as in Open with the Excel Application? No, I need to read it in using
VB. I don't know any way to read the data into VB other than those ADO
commands. Does Excel have a spreadsheet to text conversion from a DOS
prompt? The VB program is to be a process which can convert the
spreadsheets to text files; to be called from another application, which can
then read in the text file. The other application cannot read in Excel
spreadsheets. If there's a DOS command that can convert Excel to text, that
might work, though the VB would still be nice as it can manipulate the text
as it writes it out if necessary.

I tried using a different connection string (below) to avoid using ADO, but
that got the same results. I would need to know different commands to pull
in the data it seems.

oConn.Open "Provider=MSDASQL.1;Persist Security Info=False;" & _
"Extended Properties=DBQ=" & filename & ";" & _
"DefaultDir=" & pathname & ";" & _
"Driver={Microsoft Excel Driver (*.xls)};DriverId=790;FIL=excel 8.0;" &
_

"MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;Re adOnly=0;SafeTransactions=
0;" & _
"Threads=3;UID=admin;UserCommitSync=Yes;"

"Bob Phillips" wrote in message
...
Eric,

This is due to the way the query 'assumes' the data type I believe. So,

your
data is such that it is pre-dominantly text, so it is all assumed as text.

But why use ADO, why not just open the Excel workbook and write it as a

text
file?

--

HTH

Bob Phillips