PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: XLS to CSV  (Read 2106 times)

Cho Sing Kum

  • Junior Member
  • **
  • Posts: 174
XLS to CSV
« on: April 09, 2014, 07:02:17 AM »


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

Logged

Knuth Konrad

  • Junior Member
  • **
  • Posts: 64
Re: XLS to CSV
« Reply #1 on: April 09, 2014, 07:53:32 AM »

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.
Logged

Cho Sing Kum

  • Junior Member
  • **
  • Posts: 174
Re: XLS to CSV
« Reply #2 on: April 09, 2014, 08:15:39 AM »


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.
Logged

Eddy Van Esch

  • Senior Member
  • ***
  • Posts: 246
  • FF3 User
    • DevOTechS
Re: XLS to CSV
« Reply #3 on: April 09, 2014, 08:53:29 AM »

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
Logged
Eddy

Cho Sing Kum

  • Junior Member
  • **
  • Posts: 174
Re: XLS to CSV
« Reply #4 on: April 09, 2014, 10:24:49 AM »

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.
Logged

Cho Sing Kum

  • Junior Member
  • **
  • Posts: 174
Re: XLS to CSV
« Reply #5 on: June 28, 2014, 04:38:55 AM »


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.

Logged

Cho Sing Kum

  • Junior Member
  • **
  • Posts: 174
Re: XLS to CSV
« Reply #6 on: June 29, 2014, 08:57:04 AM »


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.

Logged