What is the most speedy way of reading data from excel ?
Is it possible to get data, formatting, etc... from a xls file without opening Excel?
Thanks...
Printable View
What is the most speedy way of reading data from excel ?
Is it possible to get data, formatting, etc... from a xls file without opening Excel?
Thanks...
The only way I know how to get data from excel with vb is to open excel and retreive data. I would think that it would be possible to read the file without opening and I would like to know how to do that too.
Once I downloaded a code which was getting excel data without opening excel, but it was'nt getting formatting, and if the first row was empty, it was returning null for the file, anyone has any ideas?
You can use ADO to read excel file, look for the connection string needed by ADO here
put a DATA1 control on form
set the property of DATA1 as shown below either design time or run time
data1.connect="Excel 5.0"
data1.recordsource=" filename with path"
data1.recordsource="xyz$"..............where 'xyz' is sheet name..
use of following string woluld give the data range of coloum 'x'
data1.recordset.fileds(x).............'0 for column1(A), 1 for column2(B)...and so on...
Does it work if we don't know the sheet name? I mean, if I want to read from the first sheet of the file..
i do not know how to call first excel sheet .but what is the use if we do not know the sheet or table name
******** what exactly you want to do.