LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default headers contains brackets

Hi

How do I do a select from a excel sheet where the column header contain
brackets? the actual name is [ID] ? I
i can't see how to escape correctly.
The code looks like:

String strConn = "Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=c:\test.xlsx;Extended Properties=Excel 12.0;";
String strSelect = "SELECT [ID] FROM [sheetname$]";
OleDbDataAdapter daMaster = new OleDbDataAdapter(strSelect, strConn);

Regards
Kim
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
lookup using column headers and row headers Memphus01 Excel Discussion (Misc queries) 1 April 13th 09 04:57 PM
when are [ ] brackets used cmat Excel Worksheet Functions 2 October 21st 08 10:35 PM
Hide Column Headers but not row (Headers) Kevan Gradwell Excel Programming 1 March 16th 07 05:59 PM
help with brackets tombradshawuk Excel Discussion (Misc queries) 3 November 17th 06 10:19 PM
=D6-E6 there are brackets? JillM Charts and Charting in Excel 1 July 21st 06 08:03 PM


All times are GMT +1. The time now is 10:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"