Xlwings to read excel file

I am trying to use xlwings to read excel file, my code is working locally but it’s throwing error : ‘nonetype’ object has no attribute ‘apps’ when running in cloud.
I have already tried openpyxl and it’s working in cloud but i really hate it’s api and it’s missing some functinality

here is my sample code

import streamlit as st
import xlwings as xw
import os

st.title("Excel File Reader")

# File uploader
uploaded_file = st.file_uploader(
    "Choose an Excel file", type=['xlsx', 'xls'])

if uploaded_file is not None:
    # Save the uploaded file temporarily
    with open("temp.xlsx", "wb") as f:
        f.write(uploaded_file.getbuffer())

    try:
        # Open the Excel file
        app = xw.App(visible=False)
        wb = app.books.open("temp.xlsx")
        sheet = wb.sheets[0]  # Get first sheet

        # Read cell B1
        cell_value = sheet.range("B1").value

        # Display the value
        st.write(f"Value in cell B1: {cell_value}")
        st.write(sheet.range("Area").value)
        st.write(sheet.range("B4:E7").value)
        # Clean up
        wb.close()
        app.quit()
        os.remove("temp.xlsx")

    except Exception as e:
        st.error(f"An error occurred: {str(e)}")
        # Clean up in case of error
        if 'wb' in locals():
            wb.close()
        if 'app' in locals():
            app.quit()
        if os.path.exists("temp.xlsx"):
            os.remove("temp.xlsx")

Installation - xlwings Documentation
xlwings (Open Source) requires an installation of Excel and therefore only works on Windows and macOS .

is there any way to make it work on windows computers, i don’t want to use it on mac/linux/smartphones

You said you face the issue “when running in cloud”. Which cloud is that?

Streamlit community cloud

That is Debian Linux, not Windows. I don’t think you can make xlwings work there.