views:

87

answers:

2

I am using the MDB as backend, frontend using vb. When i am retriving the output in excel the result provide the output the result with field names. I only need the result, how can i avoid the field name display for that. I am new in this MDB and vb. Please help me for a query providing the result without field names.

A: 

Change connection string to exclude headers, as in HDR=No.

Connection strings for Excel at http://www.connectionstrings.com/excel

AMissico
Thanks, let i try this.
Karthik
I do not think that this will help if the data is coming from Access. Furthermore, HDR=No just means that the first row is treated as data, HDR=Yes means the first row is treated as field names `With Excel workbooks, the first row in a range is the header row (or field names) by default. If the first range does not contain headers, you can specify HDR=NO in the extended properties in your connection string. ` -- http://support.microsoft.com/kb/316934
Remou
From my experience, HDR=Yes|No works as expected. This setting tells the driver how to handle the first row. How this "first" row is identified in Excel makes no difference to the driver, since the driver completely bypasses Excel. We are in agreement here.
AMissico
"I do not think that this will help if the data is coming from Access." Yes, I agree. My understanding of the statement, "When i am retriving the output in excel the result provide the output the result with field names," is they are getting data from Excel. It is possible they are using Excel and "importing external data" from the MDB. If so, that is a different answer, which is too involved without knowing how they are "retrieving the output".
AMissico
A: 

To retrieve only the data - no headers - simply use the GetString method of your ADODB.Recordset.... I assume you are using ADO....

OldManGeorge