Get list of holidays ★
Returns holidays for a given year.
A list of holidays can be obtained by tabulating them in a table.
URL
https://api.excelapi.org/datetime/holiday-list
Configuration
Configuration | Required | Description |
---|---|---|
year | ✔ | Specify the "year" to get the holiday. |
line | ✔ | Specifies the number of the holiday in the year. Usually a line number. |
country | Specifies the country code. If not specified, the default is JP (Japan). |
使用例
- Line 1: year
- Column A:row number
B2:
=WEBSERVICE("https://api.excelapi.org/datetime/holiday-list?year="&B$1&"&line="&$A2)
info
If there is no holiday, return 0 (meaning 1900/1/0). By doing so, errors will not occur in the WORKDAY function, etc.
tip
If the retrieved date format is to be changed or calculated, it must be converted to a serial value with the DATEVALUE function.
=IFERROR(DATEVALUE(WEBSERVICE("https://api.excelapi.org/datetime/holiday-list?year="&B$1&"&line="&$A2)),0)
tip
Holidays specified with the WORKDAY and NETWORKDAYS functions are supported in tabular format.
Therefore, holidays can be specified across multiple years by specifying a range of holidays.
In the following example, holidays are specified from B2 to L26.