• Welcome to PlanetSquires Forums.
 

XLS to CSV

Started by Cho Sing Kum, April 09, 2014, 07:02:17 AM

Previous topic - Next topic

Cho Sing Kum


Hi Paul,

I am looking at an old article of yours in PSC:
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=11898&lngWId=1

I am looking for some VB6 example to go the other way - XLS to CSV. I want to avoid ADO (and any OCX/ActiveX). Additionally, I have to assume there is no Excel installed on target computers so create Excel objects is out of the question.

If I were to "reverse engineer" your codes, will I be able to do it? I am thinking the core would be in the WriteValue function of ExcelFile.cls.

The XLS source is from the following link and no matter how I try to fake it by changing the contentType in the URL, the file is still XLS.

http://quotes.wsj.com/cdssvco/marketwatch/dylan/v1/HistoricalPrices?ticker=DJIA&countrycode=US&startDate=01-08-2014&endDate=04-08-2014&duration=P1D&pagePos=0&pageSize=0&sortColumn=Time&sortOrder=DESC&contentType=xls


Knuth Konrad

Is the Wallstreet Journal as a data source a must? If not, how about i.e. Yahoo stock market quotes readily deliverd as CSV (scroll a bit down for the download link).

See also http://blog.programmableweb.com/2013/05/22/96-stocks-apis-bloomberg-nasdaq-and-etrade/ for other stock market APIs.

Cho Sing Kum


I have been using Yahoo for many years but they stopped downloading of DJ family of indexes about 1-1/2 to 2 years ago. They still do allow for other indexes but not DJ's.

MSN Money and Google Finance do not allow download of all stock indexes.

I just happen to stumble onto WSJ after looking around for quite some time.

Eddy Van Esch

Cho,
The below link works for me to download csv historical data for DJIA from Yahoo Finance.
Don't know about other indexes you might need though ...
http://ichart.yahoo.com/table.csv?s=DJIA&a=02&b=01&c=2010&d=03&e=08&f=2014&g=d&ignore=.csv

Kind regards
Eddy

Cho Sing Kum

You are the man!

Using your link, I notice that it use a slightly different symbol. I just trial and error and found the replacement for the other DJ symbols:

DJIA (instead of ^DJI)
DJUA (instead of ^DJU)
DJTA (instead of ^DJT)
DJCA (instead of ^DJC)

Thanks very much.

Cho Sing Kum


DJUA, DJTA and DJCA have stopped working the past few days. XLS to CSV via wsj.com still the most reliable. I find a way to reverse engineer.


Cho Sing Kum


Changing my search to VB6 Read BIFF (instead of VB6 Read XLS) give me the search result I am looking for. Found something here at PSC:

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=61368&lngWId=1

The included XLS converted okay. Will delve into it.