Page 1 of 1

Best Practice: XRate Retreival

Posted: Mon Jun 02, 2008 8:10 pm
by Eric
I know this is not TM1, but someone here is probably doing this. I know what I want in theory, but need some guidance in practice. At the End of the day I would like to Run a TI process to execute and grab the daily exchange rate from a website for two currencies.

Anyone have any ideas they are willing to share?

Re: Best Practice: XRate Retreival

Posted: Mon Jun 02, 2008 8:39 pm
by John Hobson
http://www.xe.com/dfs/

These guys can send a daily email with the rates (payable for commercial use)

You just need to be able to parse it in some way then. (Never tried - just cut an pasted for demos in the past)

Hope this helps

John

Re: Best Practice: XRate Retreival

Posted: Tue Jun 03, 2008 7:00 am
by Michel Zijlema
Another option (also commercial, but I think cheaper) is: http://www.oanda.com/channels/business/ ... shtml#data

Michel

Re: Best Practice: XRate Retreival

Posted: Tue Jun 03, 2008 8:28 am
by TJMurphy
Does your general ledger system already get a feed of exchange rates from somewhere? Maybe you could grab it from there?

We get our treasury people (who have a Reuters system) to generate a query - they have an Excel add-in that can connect and pull down rates - and send it to us for import into TM1. Mind you, a Reuter's system would make either XE or OANDA look very, very cheap ;)

In my idle moments I've wondered about setting up a web query from Excel but I've never gotten very far in trying one out.

Tony

Re: Best Practice: XRate Retreival

Posted: Tue Jun 03, 2008 8:39 am
by Paul Segal
Or you can scrape the values from an exchange rate web page into Excel and then either run code to upload the results directly to your exchange cube, or save a text file for TI to upload. A simple version that works well is at http://petko.bossakov.eu/category/in-english/ (page down a bit), or for different ways of doing web queries from Excel see http://msdn.microsoft.com/en-us/library ... e.11).aspx. It would kind of depend on whether you're wedded to a particular exchange rate site.

Re: Best Practice: XRate Retreival

Posted: Tue Jun 03, 2008 10:09 am
by mattgoff
I think the best option is Tony's-- I'm sure it's easier to grab the data from an internal ODBC source, and your data will be aligned with other internal users. If it is not available internally, the next best way to get it is to use Perl. You can write a really trivial script (literally a one-liner) using LWP to pull XML or CSV to a local file for TM1 to import. I'd strongly recommend licensing a data feed (as described by John and Michel). If you decide to screen scrape, your setup will be much more fragile (any layout changes will break your import), and you may be violating the site's license agreement.

Matt

Re: Best Practice: XRate Retreival

Posted: Tue Jun 03, 2008 10:22 am
by bihints.com
I don't think excel or external coding needs to be involved.

Download GNU wget for windows, it is a standalone .exe

in TI prolog:
executecommand('cmd /c \\path\to\wget.exe http://www.ecb.eu/stats/eurofxref/eurof ... ?id=536163' ,1);
+another executecommand to unzip that file

in TI data tab, parse and load the resulting .csv in your cube

done