Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid first row column header problem

Status
Not open for further replies.

ranne

Programmer
Feb 24, 2005
7
US
Hi,

This may be easy, but I can't seem to find the solution.

When importing a file into a datagrid, I want the user to have the option to choose whether there are column headers in the file.

If there are no column headers, then I want the datagrid to have default headers, and the 1st row of the input file to show up as the first row in the datagrid.

The problem is that the first row in the datagrid is blank if I use the following code...

.ConnectionString = "Data Source=D:\test.xls;" & _
"Extended Properties=""Excel 8.0;hdr=no;"""

DataGrid1.ColumnHeaders = True

Why would this be? Any help that you could give me would be great!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top