How to Get Exchange Rates in Excel Automatically Using a Free API (VBA Step-by-Step)

Imagen
How to Get Exchange Rates in Excel Automatically Using a Free API (VBA Step-by-Step) Automate exchange rates in Excel in minutes. In this guide, you’ll learn how to retrieve currency data from multiple countries (including African currencies) using a free API and VBA. This example is perfect if you work with financial reports, currency analysis, or need updated data without manual input. 🚀 What will you learn? How to get real-time exchange rates in Excel How to use a free API (no API key required) How to automate Excel with VBA How to retrieve multiple currencies (USD, MXN, EUR, ZAR, NGN, etc.) 🌍 Free Exchange Rate API For this example, we will use the following free API: 👉 https://open.er-api.com/v6/latest/USD Advantages: No API key required 150+ currencies available Includes African currencies Daily updated data (not historical) 💻 VBA Macro to Get Exchange Rates in Excel Copy and paste this code into a VBA module: Sub GetExchangeRates(...

👉 Oracle API Tutorial: Actualizar Descriptive Flexfields (DFF) con Postman paso a paso

Cómo Actualizar un Descriptive Flexfield (DFF) en Oracle usando Postman y SOAP Web Services

Si necesitas actualizar un campo de un Descriptive Flexfield (DFF) en Oracle, puedes hacerlo fácilmente utilizando Postman junto con SOAP Web Services.

En esta guía paso a paso aprenderás cómo actualizar el valor de un DFF a nivel factura de Accounts Receivable (AR) o Cuentas por Cobrar consumiendo un API de Oracle.

Este tipo de integración es muy utilizada en proyectos empresariales donde se requiere automatizar procesos financieros sin intervención manual.

¿Qué es un Descriptive Flexfield (DFF) en Oracle?

Los Descriptive Flexfields permiten extender la funcionalidad estándar de Oracle agregando campos personalizados sin modificar la estructura base del sistema.

Son ampliamente utilizados para almacenar información adicional en facturas, clientes, proveedores y múltiples módulos financieros.

Cómo encontrar un API de Oracle

Primero debemos ir a la documentación oficial de Oracle:

https://docs.oracle.com/en/cloud/saas/sales/oesws/Sample-Payloads-for-CustomerAccount-Webservice-Requests-Landingpage.html

Desde esa pantalla identificaremos la URL del servicio:

Service WSDL URL: https://servername/fscmService/ErpObjectDFFUpdateService?WSDL

Configurar la petición en Postman

Ahora entraremos a Postman para construir nuestro request SOAP.

Guía para ejecutar el API desde Postman

Selecciona el método POST y utiliza la URL del servicio reemplazando servername por tu servidor:

https://servername/crmService/fscmService/ErpObjectDFFUpdateService

Después agrega tus credenciales en la sección Authorization y en Body selecciona raw → XML.

XML para actualizar un DFF en Oracle

Utiliza el siguiente XML como base para ejecutar la actualización:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:typ="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/"
 xmlns:erp="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:updateDffEntityDetails>
         <typ:operationMode>SINGLE</typ:operationMode>
         <typ:object>
            <erp:EntityName>Receivables Invoice</erp:EntityName>
            <erp:ContextValue>Contexto</erp:ContextValue>
            <erp:UserKeyA>{{TransactionNumber}}</erp:UserKeyA>
            <erp:UserKeyB>#NULL</erp:UserKeyB>
            <erp:UserKeyC>#NULL</erp:UserKeyC>
            <erp:UserKeyD>{{TransactionID}}</erp:UserKeyD>
            <erp:UserKeyE>#NULL</erp:UserKeyE>
            <erp:DFFAttributes>{"ATTRIBUTE1":"valor","ATTRIBUTE2":"valor2"}</erp:DFFAttributes>
         </typ:object>
      </typ:updateDffEntityDetails>
   </soapenv:Body>
</soapenv:Envelope>

Valores que debes modificar

  • Contexto: valor del contexto donde está el DFF.
  • TransactionNumber: número de factura o transacción.
  • TransactionID: identificador interno de Oracle.
  • ATTRIBUTE1 / ATTRIBUTE2: campos que deseas actualizar.

Query para obtener los IDs

select
   rca.CUSTOMER_TRX_ID,
   rca.TRX_NUMBER
from RA_CUSTOMER_TRX_ALL rca;

Conclusión

Actualizar un DFF en Oracle mediante APIs permite automatizar procesos financieros, reducir errores manuales y mejorar la integración entre sistemas empresariales.

Si trabajas con Oracle Cloud o implementaciones ERP, dominar este tipo de integraciones puede ahorrarte muchas horas de operación.

Comentarios

🚀 Mantener este blog funcionando requiere tiempo y café. ¡Puedes contribuir con uno aquí!

Entradas más populares de este blog

Guía Práctica: Ejemplo Completo de ASPX para Desarrolladores Web

👉 Cómo obtener el tipo de cambio en Excel con API de Banxico (paso a paso)

Macro en Word para automatizar documentos: genera diplomas en segundos (con código VBA)