Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help to automatically save and import a .csv file from the web

Featured Replies

I'm trying to create a script to automatically save and import a .csv file containing weekly currency exchange rates. The .csv file is available on the web.

The importing should be pretty easy, but how to automatically open the link and save the .csv file?

Any help would be really appreciated!

Which is the link ?

  • Author

It's a link to the last five days of currency exchange rates, as published by the Bank of Canada:

http://www.bankofcanada.ca/en/markets/csv/exchange_eng.csv

OK.

I'm going to explain you a simple way BUT you'll need to make some adjustment to the result.

1) place in the layout a tiny Web Viewer with this address: "http://www.bankofcanada.ca/en/markets/csv/exchange_eng.csv"

and give to the Web Viewer an Object Name ( like I did: "wv" ).

2) create an UNSTORED calculation field ( name it: FieldToExport ), with calc:

Let([

t = GetLayoutObjectAttribute ( "wv" ; "content" ) ;

start = Position ( t ; "year>)," ; 1 ; 1 ) + 10 ;

end = Position ( t ; "</PRE>" ; 1 ; 1 ) - 1

];

"Date," & Middle ( t ; start ; end - start )

)

3) Create a script with 3 steps:

Set Variable [ $path ; Value: "File:untitled.txt" ]

Export Field Contents [ YourTable::FieldToExport ; $path ]

Convert File [ No dialog ; $path ]

4) Fire that script and see the result

As I said, this is ONLY a starting point.

  • Author

It didn't work for me. When I placed the web viewer on the page and specified the link, it opens up a seperate window in Excel. Then, exporting the contents web viewer created a file with just the word "data" in it.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.