Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
The example running environment of this guide is Ubuntu 20.04; you can adjust it according to your actual situation. In order to ensure that the examples can run properly, we need to install some necessary tools in the environment. The following is a brief step‑by‑step guide to help you complete the process. Please note that this is only a rough guide, and the specific details may vary depending on your system and needs.
If not installed, install it as follows:
sudo apt install python3 python3-pip # Ubuntu/Debian
# sudo yum install python3 python3-pip # CentOS/RHEL
Check version:
python3 --version
pip3 --version
If not installed, install it as follows:
sudo apt install openjdk-11-jdk # Ubuntu/Debian
# sudo yum install java-17-openjdk # CentOS/RHEL
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
ENV PATH=$JAVA_HOME/bin:$PATH
Check version:
java -version
The virtual environment is installed based on your actual needs. It is recommended to use virtual environments to manage project dependencies in both development and production environments. Please use the following command to install:
sudo apt install python3-venv # Ubuntu/Debian
# sudo yum install python3-venv # CentOS/RHEL
Create a virtual environment:
python3 -m venv myenv # Create a virtual environment named myenv in the current directory
Start the virtual environment:
source myenv/bin/activate
Notice: If a virtual environment is used, the following operations require the activation of the corresponding virtual environment first
If not installed, install it with:
pip install Flask
If not installed, install it with:
pip install gunicorn
If not installed, install it with:
pip install jpype1
If not installed, install it with:
pip install aspose-cells
To create the Hello World application using the Aspose.Cells API:
The examples below demonstrate the above steps.
The following example creates a new workbook from scratch, writes the words “Hello World!” into cell A1 on the first worksheet, and saves the file.
Suppose we have a test path /app. We will complete the following work under this test path.
hello.pycustom_gunicorn.pyVerify that all packages required by the service are installed, then start the service.
If you use the python3-venv virtual environment, you need to create a virtual environment in the test path, start it, and then install all the required tool packages.
python custom_gunicorn.py # or python3 custom_gunicorn.py
http://127.0.0.1:5000/.After doing this, you will get an Excel file named after the content you entered in the current test path. The preview effect is as follows:

Alternatively, you can put the above operations into a Docker container. It is very simple to use Docker to build the environment required by the example. Just place the operations into a Dockerfile.
Here is a Dockerfile for reference. It lists some necessary toolkits required to build the environment.
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
python3-dev \
python3-venv \
build-essential \
libssl-dev \
libffi-dev \
libpq-dev \
openjdk-11-jdk \
wget \
curl \
unzip \
&& rm -rf /var/lib/apt/lists/*
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
ENV PATH=$JAVA_HOME/bin:$PATH
WORKDIR /app
COPY . /app
RUN pip install -r requirements.txt
CMD ["python3", "custom_gunicorn.py"]
This file is mainly used to provide a dependency environment for Python projects. You can modify the versions in this file to suit your needs.
aspose-cells==24.11.0
jpype1==1.5.1
Flask==3.0.3
gunicorn==23.0.0
The main file structure is as follows:
app/
|- requirements.txt
|- hello.py
|- custom_gunicorn.py
You can start the container using the following command:
docker run --rm -p 127.0.0.1:5000:5000 gunicorn_flask:v1.0 # gunicorn_flask:v1.0 – image built by the Dockerfile
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.