PDA

View Full Version : HTTP: Yahoo Currency Conversion



stanl
09-19-2007, 01:18 PM
I was just playing this afternoon... this seems to work. Thought I'd post it so someone can break it. Basically it is a routine to parse an HTTP response based on Yahoo's currency conversion website.

Stan: pray2:

RonMcK
09-19-2007, 02:53 PM
Stan,

I'm getting "sub or function not defined" on split(); I'm running Excel 2004 on Mac here at the office. Searching VB Help and Excel Help shows nada. Is this a built-in function for Excel or is it user-defined? Searching the VBAX msgbase returns hits where split() is being used but no listing for it if it is a udf.

Can you shed some light on this for me?

Thanks * 10 ^ 10

stanl
09-19-2007, 04:33 PM
:dunno I think it is just VBA

http://www.j-walk.com/ss/excel/tips/tip93.htm

RonMcK3
09-19-2007, 07:17 PM
:dunno I think it is just VBA

http://www.j-walk.com/ss/excel/tips/tip93.htm

Stan,

Yes, it's part of VBA (if you're on Windoze); now that I'm home and on my PC, I see that it's native 'split(Expression as String, [delimiter],[Limit as Long = -1],[Compare as VbCompareMethod = vbCompareBinary])'.

So, another deficiency that I have to code around on the Mac. :(

Thanks,

mdmackillop
09-19-2007, 11:58 PM
Hi Stan
Very nice.
A couple of thoughts.
Woud using Comboboxes allow autofill to cut down on scrolling?
Show the rate in a separate cell. Just a double check as I know what the approximate rate should be, but I might not recognise an error in the converted value.
Regards
Malcolm

stanl
09-20-2007, 03:18 AM
Hi Stan
Very nice.
A couple of thoughts.
Woud using Comboboxes allow autofill to cut down on scrolling?


Definitely combos are superior. I threw the xls together in ~3 minutes. Really more interested in the parsing as I would like to (1) select a currency + unit amount (2) then create a table for all other countries with the country in #1 included in the table at its rank in the table. I'd like to perform DHTML on the HTTP responsetext rather than the instr() parsing or going to Xpath or SAX... perhaps pass the response to an MSHTML: control via writeln()?????:dunno Stan

mdmackillop
09-20-2007, 03:53 AM
It's the Excel bit I can understand!

stanl
09-20-2007, 09:07 AM
It's the Excel bit I can understand!

Specifically, which bit? Are you saying some sort of full Monty table created from a base unit for a base currency is not something you would do in Excel?

mdmackillop
09-20-2007, 10:05 AM
I'd like to perform DHTML on the HTTP responsetext rather than the instr() parsing or going to Xpath or SAX... perhaps pass the response to an MSHTML: control via writeln()
:jawdown:

stanl
09-20-2007, 04:15 PM
I hope it wasn't the SAX. I trust you are at least interested in SAX. I know people who can't go for 2 days without SAX:clap:

Ivan F Moala
09-20-2007, 07:13 PM
I hope it wasn't the SAX. I trust you are at least interested in SAX. I know people who can't go for 2 days without SAX:clap:


:)

stanl
09-21-2007, 01:40 PM
:)

No No No... that would be XXX-Path, not xPath and I'll stick with SAX.