
Export Public Holidays to Excel or Google Sheets as CSV
You can export public holidays to a CSV file and open it in Excel or Google Sheets. This is useful for planning a project calendar, a staff rota or a delivery schedule. The HolidaysMap API creates the CSV for you, so you do not need to copy dates by hand.
This guide is for people who use a spreadsheet, and for developers who need to hand a file to someone who does.
Download the holidays as CSV
Add output=csv to the request. Save the response to a file with -o:
curl "https://holidaysmap.com/api/v1/holidays?key=YOUR_API_KEY&code=DE&start=2027-01-01&end=2027-12-31&format=YYYY-MM-DD&output=csv" -o germany-2027.csv
The range parameters require the Premium plan or higher. If you are on the Free or Basic plan, request a single date instead, for example date=2027-01-01, or upgrade first. The pricing guide compares the plans.
What is in the file
The first line is a header row. Each holiday is one row, with these columns:
_id: an internal identifier. The current responses leave it empty, so you can delete the column.name: the holiday name, for exampleNew Year's Day.date: the date in the format you asked for.is_public:truefor public holidays andfalsefor observances.country: the country name.country_code: the two-letter country code.
Choose the date format
Spreadsheets read dates according to the regional settings on your computer. A date such as 05-01-2027 can mean 5 January in one country and 1 May in another. To avoid this, request the ISO format:
format=YYYY-MM-DD
Dates in 2027-05-01 form are read the same way everywhere, and they sort correctly.
Open the file in Excel
- Open Excel and choose Data, then From Text/CSV, and select the file.
- Check the preview. The
datecolumn should show as dates. If it shows text, choose Date as the column type. - Select Load.
Import the file into Google Sheets
- Open a new spreadsheet and choose File, then Import.
- Choose Upload and select the CSV file.
- Set the separator type to Comma and select Import data.
Google Sheets detects ISO dates automatically. Sort by the date column to see the holidays in order.
Filter to public holidays only
Most planners only need public holidays. In Excel or Google Sheets, add a filter on the is_public column and keep only the TRUE rows. Observances stay in the file, so you can still see them if you need them.
Use XML for older systems
Some enterprise systems read XML instead of CSV. Add output=xml to get the holidays wrapped in holiday elements. XML is also a good choice when the receiving system validates a schema.
curl "https://holidaysmap.com/api/v1/holidays?key=YOUR_API_KEY&code=DE&date=2027-01-01&format=YYYY-MM-DD&output=xml"
Any value other than json, csv or xml returns an error. The default is json.
Next steps
- Read the API documentation for all output options.
- For a single-day answer in code instead of a file, see how to check if a date is a public holiday.
- Find the country code on the supported countries page.