I'm trying to execute some shell commands from an Excel macro.
Write the columns from database 'nfldb', Table 'team' to a CSV file.
In the comand line prompt:
Does exactly what I want it to do, but how do I incorporate these statements into a VBA script to run inside Excel?
Thanks for any help!
Write the columns from database 'nfldb', Table 'team' to a CSV file.
In the comand line prompt:
Code:
>cd C:\Program Files (x86)\PostgreSQL\9.3\bin
and then...
>psql -d nfldb -U nfldb -w
and then...
>\copy (SELECT * FROM team) TO 'C:\Python27\temp\teamNames.csv' With CSV
Does exactly what I want it to do, but how do I incorporate these statements into a VBA script to run inside Excel?
Thanks for any help!