开发者

Excel data connection - remove header row?

开发者 https://www.devze.com 2022-12-23 23:07 出处:网络
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=XX

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号