title: In Excel 2007, how can I access the Command Text property of a Workbook Connection using C#?
body: <p>The property is located on the Data tab > Connections > Properties > Definition tab</p>
  
  <p>The spreadsheets in the system I'm working on are refreshed daily using workbook connections which execute a stored procedure from the command text. I want to be able to get this property from these existing spreadsheets and create a list of all the stored procedures currently in use. </p>
  
  <p>I've done lots of searching but I haven't found anything. Possible API's I've researched are  DocumentFormat.OpenXml.Spreadsheet and Microsoft.Office.Interop.Excel.</p>
  
  <p>Basic Pseudocode:
  -Open Spreadsheet
   -For each workbook connection
  -Add Command Text property to list</p>