Actually there is not such a thing as an "Open or Close" Purchase Order.
It is Fully Received, Partially Received, or Un-received.
In reality you should use the Purchase Order Lines to determinate what PO is "Open" or "Close"
of course you don't have to "show" the purchase order line fields.
Here is your Excel VBA Code :
Private Sub get_data()
Dim odbc_su As String
Dim su_conn As New ADODB.Connection
Dim su_rs As New ADODB.Recordset
Dim curr_wb As Workbook
Dim curr_sh As Worksheet
Dim row_01 As Integer
Dim var_sql As String
odbc_su = "DBA" 'THIS IS YOUR ODBC CONNECTION
Set curr_wb = ThisWorkbook
Set curr_sh = curr_wb.Sheets("Main") ' YOUR SHEET NAME
su_conn.CursorLocation = adUseClient
su_conn.Open odbc_su
var_sql = "HERE YOU ENTER YOUR SQL SCRIPT"
su_rs.Open var_sql, su_conn, adOpenStatic
curr_sh.Cells("A5 P500").Value = Empty 'CLEAN PREVIOUS VALUES it is missing the : the forum shows it as an smiley face
row_01 = 5
Do While Not su_rs.EOF
curr_sh.Cells(row_01, 1).Value = su_rs("MY FIELD")
curr_sh.Cells(row_01, 2).Value = su_rs("MY OTHER FIELD")
' MORE ROWS HERE ........
su_rs.MoveNext
row_01 = row_01 + 1
Loop
su_rs.Close
su_conn.Close
End Sub
Have fun !!!
Kelloggs