1

Using: T-SQL, SSMS 2008, Excel 2010

Problem:

I am wondering if there is a way for a T-SQL query to run (in an Excel workbook as a connection) and NOT return headers / field names. (edit: my question solely pertains to the header suppression issue. I am good on creating a connection in a workbook and etc.!)

Reason:

I want an offshore team to be able to run my query and then feed the generated report into the application they use. The only thing is, is that the application they use cannot accept results with a header row. Yes, it would be easy for them to simply delete it, but there is high turnover there, and re-explaining things is not that easy when offshoring.

Add'l Considerations:

Thank you!

Community
  • 1
  • 1
Chase
  • 544
  • 1
  • 11
  • 25

1 Answers1

3

Excel 2010 has the 'Header Row' option on the 'Design' tab - with a table cell selected, navigate to the Design tab and uncheck this to remove the header row.

enter image description here

Walkthrough from Microsoft Support here.

AHiggins
  • 7,029
  • 6
  • 36
  • 54
  • When I test this by applying the change after the fact in a similar Sql Server-dependant Excel document, it just makes the existing row blank, which may or may not meet the OPs needs. – Joel Coehoorn Jan 04 '16 at 20:07
  • Very interesting...I did your suggestion, and then deleted that now-blank header row, thus pushing the first record to begin in A1. I made a small change to the query, refreshed it, and...it worked! The records were returned beginning in cell A1. Thanks for the tip! – Chase Jan 05 '16 at 16:14