Get Unit Rate from Web site directly to MS Access (1 Viewer)

mobarak ahmed

Member
Local time
Today, 10:01
Joined
May 28, 2021
Messages
95
Hi dears
In form invoice
i want to get US Dollar (Unit rate) in case the Project currency is USD from this site
for example invoice to : AC Boilers EGYPT -- Project name : Cairo West E USD 10089-CP-105 / Electrical I&C Supply and Installation
to be paste on "Currency Unit Rate" Text box
* date is the same date as today
* Buy rate
 

Attachments

  • Mobarak - 3-10-2021.zip
    2.4 MB · Views: 277
Last edited:

Gasman

Enthusiastic Amateur
Local time
Today, 09:01
Joined
Sep 21, 2011
Messages
14,370
I want the code . I don’t have one
So no attempt to try for yourself? :(
I think you might have to wait for @arnelgp to see the post. He has done some work with webscraping and tends to write all the code for people who do not want to do it themselves.
I had a look and you also have to put in the required currency to start with? Looks very interactive when you use it, no explicit url to pick up on?
 

mobarak ahmed

Member
Local time
Today, 10:01
Joined
May 28, 2021
Messages
95
I have tried but I failed.. the url when you choose date and currency and click show data .. doesn’t contain the choices
I have looked up in the inspect but it’s very complicated for me
So no attempt to try for yourself? :(
I think you might have to wait for @arnelgp to see the post. He has done some work with webscraping and tends to write all the code for people who do not want to do it themselves.
I had a look and you also have to put in the required currency to start with? Looks very interactive when you use it, no explicit url to pick up on?
 

Gasman

Enthusiastic Amateur
Local time
Today, 09:01
Joined
Sep 21, 2011
Messages
14,370
I have tried but I failed.. the url when you choose date and currency and click show data .. doesn’t contain the choices
I have looked up in the inspect but it’s very complicated for me
Probably to avoid exactly what you are trying to do?
Have you looked at other sites where you can supply values to get an actual url where you can scrape the values?
 

mobarak ahmed

Member
Local time
Today, 10:01
Joined
May 28, 2021
Messages
95
Probably to avoid exactly what you are trying to do?
Have you looked at other sites where you can supply values to get an actual url where you can scrape the values?
Unfortunately this the only official and approved site in our work field
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:01
Joined
May 7, 2009
Messages
19,246
test your Exchange rate (buying dollar).
 

Attachments

  • Mobarak - 3-10-2021.zip
    1.8 MB · Views: 317

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:01
Joined
Feb 19, 2002
Messages
43,374
Have you looked at the documentation on this page?
The papers are in Arabic so I can't tell if they are insturctions. Look for things that talk about REST which is a common interface protocall.
 

mobarak ahmed

Member
Local time
Today, 10:01
Joined
May 28, 2021
Messages
95
Have you looked at the documentation on this page?
The papers are in Arabic so I can't tell if they are insturctions. Look for things that talk about REST which is a common interface protocall.
thank you for helping me , i think we don't need to know , but thank you i appreciate
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:01
Joined
May 7, 2009
Messages
19,246
i removed my vmware so only office 2021 x64 is installed.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:01
Joined
May 7, 2009
Messages
19,246
i download the excel file exchange rate from 2020 upto Oct 4, 2021 and
import it to tblExchangeRate. these rate are historical, so it will not
change. this is to prevent going to the site everytime an old invoice_date is typed.
 

Attachments

  • Mobarak - 3-10-2021.zip
    1.8 MB · Views: 160

mobarak ahmed

Member
Local time
Today, 10:01
Joined
May 28, 2021
Messages
95
i download the excel file exchange rate from 2020 upto Oct 4, 2021 and
import it to tblExchangeRate. these rate are historical, so it will not
change. this is to prevent going to the site everytime an old invoice_date is typed.
so should i update this table every month or period ?
i think if it possible to link invoice date directly to the site it would be better
as it will be automatically updated
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 16:01
Joined
May 7, 2009
Messages
19,246
i think if it possible to link invoice date directly to the site it would be better
you can't link it, the site is a Form, so you need to fill up the
form first before you can Download the excel file.
if you are not creating an invoice, retro-active, you
do not need to update the table.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 04:01
Joined
Feb 19, 2002
Messages
43,374
It is easiest to save the current exchange rate when you add a new transaction. That way history takes care of itself. You only ever need to worry about getting the CURRENT exchange rate.

Exchange rates vary, sometimes wildly, throughout the day and potentially more throughout a month. I think credit card companies use the closing rate for the "day" whatever that is to process charges made that day.

I couldn't use arnel's sample so I don't know how it works. It sounds like it is screen scraping to download the exchange rates. Most sites like this offer an API so you can find a single exchange rate without resorting to screen scraping.. The site will provide documentation. That is what I was hoping you would find in the documents I point you to. Sites have different rules. Most will offer a paid service and a free one. The "get one rate" per day is almost always free.
 

Users who are viewing this thread

Top Bottom