> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nextedy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Import Calendars from CSV

> Load resource capacity data from an external CSV file instead of from Polarion users, enabling integration with external planning tools in Nextedy GANTT.

export const LastReviewed = ({date}) => {
  if (!date) return null;
  const formatted = new Date(`${date}T00:00:00Z`).toLocaleDateString("en-US", {
    year: "numeric",
    month: "long",
    day: "numeric",
    timeZone: "UTC"
  });
  return <p className="mt-10 text-sm text-gray-400 dark:text-zinc-500 not-prose">
      Last reviewed on {formatted}
    </p>;
};

## Prerequisites

* Access to the Polarion server file system (to place the CSV file)
* Access to **Administration > Configuration Properties**

<Steps>
  <Step title="Prepare the CSV File">
    Create a semicolon-delimited CSV file with the following column order:

    | Column       | Description               | Example     |
    | ------------ | ------------------------- | ----------- |
    | `PROJECT_ID` | Polarion project ID       | `MyProject` |
    | `USER_ID`    | Polarion user ID          | `jsmith`    |
    | `YEAR`       | Calendar year             | `2025`      |
    | `START`      | Start day of year (1-366) | `60`        |
    | `END`        | End day of year (1-366)   | `90`        |
    | `CAPACITY`   | Working hours per day     | `8`         |

    Each row defines a capacity period for one user. Set `CAPACITY` to `0` for non-working periods.

    <Tip title="Day-of-Year Values">
      The `START` and `END` columns use day-of-year numbers (1 = January 1; December 31 is day 365, or day 366 in a leap year). You can calculate these from dates in a spreadsheet before exporting.
    </Tip>
  </Step>

  <Step title="Upload the CSV File">
    Place the file at the following path on the Polarion server:

    ```
    /.polarion/nextedy/resource-capacity.csv
    ```

    This is the fixed path that the Gantt reads from. The file must be accessible to the Polarion server process.
  </Step>

  <Step title="Enable CSV Calendar Loading">
    Add the following property under **Administration > Configuration Properties**:

    ```
    nextedy.gantt.loadResourcesFromCsv=true
    ```

    This tells the Gantt to load resource definitions from the CSV file instead of from Polarion users.

    <Warning title="CSV Loading Message">
      When the CSV file is being parsed for the first time, the Gantt widget displays a message: **"CSV User Calendar is loading, it may take few minutes..."**. This is expected behavior during the initial load.
    </Warning>
  </Step>

  <Step title="Enable Working Calendars in the Widget">
    Open the Gantt widget parameters and navigate to **Working Calendars**:

    1. Set **Use Working Calendar** to **Yes**
    2. Set **Load User Calendars** to **Yes**

    <Frame>
      <img src="https://mintcdn.com/none-17b4493f/DDjWgCW2DWY5biNv/gantt/diagrams/guides/calendars/csv-calendar-import/diagram-1.svg?fit=max&auto=format&n=DDjWgCW2DWY5biNv&q=85&s=5f79cab8399e657ffafd3a7408e11b05" alt="diagram" style={{ maxWidth: "820px", width: "100%" }} width="820" height="140" data-path="gantt/diagrams/guides/calendars/csv-calendar-import/diagram-1.svg" />
    </Frame>
  </Step>

  <Step title="Enable Calendar Caching (Recommended)">
    For improved performance on repeated page loads, enable server-side caching:

    ```
    nextedy.gantt.workingCalendar.useCache=true
    ```

    The cache persists between page loads. After updating the CSV file, clear the cache to load the new data.

    <Warning title="Cache Clearing">
      After replacing the CSV file, you must clear the calendar cache for changes to take effect. Use the **Clear Calendar Cache** toolbar button (shown when caching is enabled) or the `api/clearCalendarCache` endpoint.
    </Warning>
  </Step>
</Steps>

## CSV File Example

```
MyProject;jsmith;2025;1;120;8
MyProject;jsmith;2025;121;125;0
MyProject;jsmith;2025;126;365;8
MyProject;mdoe;2025;1;365;6
```

In this example:

* **jsmith** works 8 hours per day, except days 121-125 (a vacation week with 0 hours)
* **mdoe** works 6 hours per day all year

## Verify

You should now see grey allocation markers in the resource view on days where the CSV defines zero capacity for a user. Days with reduced hours display the correct capacity values in the resource markers.

## See Also

* [Set Up Work Item Calendars](/gantt/guides/calendars/work-item-calendar)
* [Use Calendars from Another Project](/gantt/guides/calendars/cross-project-calendar)
* [Customize Working Hours per Resource](/gantt/guides/calendars/working-hours-per-resource)
* [Set Up the Resource View](/gantt/guides/resources/resource-view)

<LastReviewed date="2026-06-24" />
