---
title: "How to upload an Excel spreadsheet as PSML"
source: https://dev.pageseeder.com/get_started/tutorials/upload_excel_as_psml.html
description: "Explain the steps to create a PSML file from an excel file"
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~1926
---

# How to upload an Excel spreadsheet as PSML

| Property | Value |
| --- | --- |
| Skills required | XML, XSLT, Apache Ant, Pageseeder |
| Time required (minutes) | 30 |
| Intended audience | Developer |
| Difficulty | Medium |
| Category | Document |

## Objective

This tutorial will explain how to create PSML files from an Excel file using an Ant publishing task (upload).

## Prerequisites

To complete this tutorial it is necessary that the user has [Administrator](../../reference/glossary/administrator.md) privileges.

## Tutorial

All the files for this tutorial are on [Github](https://github.com/pageseeder/pageseeder-tutorials/tree/master/converting_excel_to_psml).

It will use the publishing task of type '`upload`'. 

The PageSeeder [project](../../reference/glossary/project.md) name used in this tutorial is '`tutorial`' and the [group](../../reference/glossary/group.md) name is '`films`'. However both names can be replaced by an alternate project and group name. 

### publish-config.xml

This file adds actions to the PageSeeder screen. The sample file at Github will add a new upload task when it recognizes an Excel file (XLSX).

The correct folder in which to place this file is described in the article [Publish template folder](../../reference/folders_and_files/project_template/publish.md).

#### Uploading this file to PageSeeder:

Go to the **Project files** page located under the the **Dev** tab in the **Developer perspective**.

![How to go to Project Files](/content/get_started/tutorials/../../images/tutorials/how_to_create_a_pageseeder_document_from_an_excel_spreadshee_files/GoingToProjectFiles.webp)

 

On this new screen, **create** the folder structure shown below in case it doesn't exist.

If the `publish-config.xml` doesn't exist, **copy** the file from the sample package to the specified folder. If it already exists, copy only the content from inside that file. Copy the entire element `<action>` from the sample and paste it into the existing `publish-config.xml` file.

![publish-config.xml file location](/content/get_started/tutorials/../../images/tutorials/how_to_create_a_pageseeder_document_from_an_excel_spreadshee_files/Publish-ConfigLocation.webp)

 

#### Validating this step:

Validate that this is working correctly by trying to upload any Excel file.

Go to the documents folder and on the right menu **click** on **Upload**.

![Click on Upload](/content/get_started/tutorials/../../images/tutorials/how_to_create_a_pageseeder_document_from_an_excel_spreadshee_files/ClickOnUploadOption.webp)

 

**Choose** an Excel file and **click** on **Options**. If 'Upload as PSML' can be seen, Step 1 has been properly configured.

![Validating Upload action creation](/content/get_started/tutorials/../../images/tutorials/how_to_create_a_pageseeder_document_from_an_excel_spreadshee_files/ValidatingUploadAction.webp)

#### More details

In case a little customization is desired, further information can be found in the articles [PSML document publishing](../../guide/configuration/psml/psml_document_config/document_publishing.md) and [publish-config.xml](../../reference/folders_and_files/project_template/publish/publish-config.md).

### Publish script folders

This folder is required to contain the ANT script and associated files.  More details regarding it can be found in [Publishing](../../guide/publishing.md).

**Click** on **Toolbox** from the **Dev** menu:

![Tool Box Menu](/content/get_started/tutorials/../../images/tutorials/how_to_create_a_pageseeder_document_from_an_excel_spreadshee_files/ToolBoxDev.webp)

 

Then **click** on **Project Files**.

![Project Fileslink on Toolbox Page](/content/get_started/tutorials/../../images/tutorials/how_to_create_a_pageseeder_document_from_an_excel_spreadshee_files/ProjectFilesOnToolbox.webp)

 

**Log in** to the PS Publisher and create folders shown below.

![ValidatingPublisherFolderStructure.png](/content/get_started/tutorials/../../images/tutorials/how_to_create_a_pageseeder_document_from_an_excel_spreadshee_files/ValidatingPublisherFolderStructure.webp)

### ANT script

In this step an ANT script will be created.

**Copy** the files `build.xml`, `films-template.xsl` and `ps-ant-excel-*.jar` to the folders created in the previous step. It should look like the image below.  For any ANT script the `build.xml` will need to be created (the other two files are just for this tutorial).

![Publisher Files Location](/content/get_started/tutorials/../../images/tutorials/how_to_create_a_pageseeder_document_from_an_excel_spreadshee_files/ValidatingPublisherFolderStructure.webp)

#### File build.xml

This has an Ant script to:

- Upload the source file (.xlsx) for processing;
- Call the `import-spreadsheet` (ps-ant-excel-\*.jar) ANT task to transform the OpenXML from Excel to an XML format that is easier to process. This format will be referred to as “interim”;
- After creating the interim files, ANT calls `films-template.xsl` to transform them to PSML;
- Upload and register the PSML files in PageSeeder.

![Overview.png](/content/get_started/tutorials/../../images/tutorials/How_to_create_a_PageSeeder_document_from_an_Excel_spreadsheet_files/Overview.webp)

This script can be customized for different requirements. More details regarding the parameters used in it can be found in [Publishing](../../guide/publishing.md).

#### File ps-ant-excel-\*.jar

This has the ANT task and Java logic to read the Excel File(Open XML) and create the new XML files (Interim format).  Some interim files examples can be found in interim.zip from Github. 

There are three types of interim files:

- One is the `workbook.xml` which maps to the second type;
- Second is the `Sheet*.xml` which maps to the third type. Each worksheet in Excel, creates a `Sheet*.xml`;
- Third represents each row of each sheet, excluding the first line which is the header row. If the sheet has 100 lines, the process generates 99 files due to ignoring the header row.

#### File films-template.xsl:

This is an example of transforming the interim files to PSML. Feel free to customize it according to any particular requirements.

### Testing

In order to test, the `MoviesData.xlsx` will be uploaded to the “films” group.

Go to the documents folder and on the right menu **click on** Upload.

![Click on Upload](/content/get_started/tutorials/../../images/tutorials/how_to_create_a_pageseeder_document_from_an_excel_spreadshee_files/ClickOnUploadOption.webp)

Load `MoviesData.xlsx` , click **Options** and **Upload as PSML**.

> **Note:** When using your own spreadsheet make sure of the following: - The values in the `titles` column have no leading or trailing spaces. - The values in the `titles` column are unique as these will become filenames.

 

![Upload as PSML](/content/get_started/tutorials/../../images/tutorials/how_to_create_a_pageseeder_document_from_an_excel_spreadshee_files/ValidatingUploadAction.webp)

 

On the pop-up “Upload Confirmation”, click **continue** and wait for the five steps to finish.

 

![Upload Completed](/content/get_started/tutorials/../../images/tutorials/how_to_create_a_pageseeder_document_from_an_excel_spreadshee_files/UploadFive5Completed.webp)

If the files are visible on the document browse page, they were successfully converted.

![Outcome Result](/content/get_started/tutorials/../../images/tutorials/how_to_create_a_pageseeder_document_from_an_excel_spreadshee_files/ValidationgWholeUploadProcess.webp)

 

The Annie Hall content should be similar to the below image.

 

![Outcome Annie Hall](/content/get_started/tutorials/../../images/tutorials/how_to_create_a_pageseeder_document_from_an_excel_spreadshee_files/Outcome-AnnieHall.webp)

