The wsj website lets you download csv data for DJI. If you play around a little bit, you can figure out the url query to kick off a download. The, you can use Powershell to make the download programmatic (note: this script also accesses stock quotes from yahoo finance using their currently available csv download method) (Note: the codes for the yahoo query are documented here: http://www.canbike.org/information-technology/yahoo-finance-url-download-to-a-csv-file.html)
#script follows
cls
Function Get-LastFriday
{
$djiDate = [DateTime]::Now
while ($djiDate.DayOfWeek -ne "Friday")
{
$djiDate= [DateTime]::Now.AddDays(-1)
}
return $djiDate
}
#prototype: quotes.wsj.com/index/DJIA/historical-prices/download?MOD_VIEW=page&num_rows=1&range_days=1&startDate=08/20/2016&endDate=08/20/2016
$djiDate = Get-LastFriday
$startDate = $endDate = ([String]$djiDate.Month) + "/" + ([String]$djiDate.Day) + "/" + ([String]$djiDate.Year)
$uri = "quotes.wsj.com/index/DJIA/historical-prices/download?MOD_VIEW=page&num_rows=1&range_"+$startDate+"&endDate="+$endDate
Invoke-WebRequest -Uri $uri -OutFile "C:\Users\xxxx\Desktop\dji.csv"
Import-Csv -Header Date, Open, High, Low, Close -LiteralPath "C:\Users\bill\Desktop\dji.csv" | Out-GridView
Invoke-WebRequest -Uri "http://download.finance.yahoo.com/d/quotes.csv?s=^DJI,VWIAX,VMMXX,VWELX,DODGX&f=nsl1d1t1p&e=.csv" -OutFile "C:\Users\xxxx\Desktop\q.csv"
Import-Csv -Header Name, Symbol, 'Last Trade', 'Trade Date', 'Last Trade Time', p -LiteralPath "C:\Users\bill\Desktop\q.csv" | Out-GridView