Excel data connection - remove header row?
The excel spreadsheet is connecting to SQL server 2005 using the connection string below:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=XXXXXX;Data Source=XXXXXX;Extended Propertie开发者_如何学运维s="HDR=No";Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=XXXXXX;Use Encryption for Data=False;Tag with column collation when possible=False
It then pulls data from a view into Excel. The business user wants this information without a header row. This will allow her to review then save as a "headless" csv in SAGE file format.
I attempted to alter the connection string by adding HDR=No but that hasn't worked. Additionally, I can't delete the header row. Deleting the content replaces the column names with "Column 1" etc.
Any ideas appreciated!
One way to try is by giving a space as column alias.
SELECT field1 ' ', field2 ' ' FROM table1
精彩评论