📊Univer Go: AI combined with spreadsheets to automate the entire process of data collection and filling

·

5 min read

From now on, say goodbye to manually filling in data:

Hi👋, I would like to recommend an intelligent template developed based on the Univer Go platform - AI Data Enrichment. This template deeply integrates the Phidata API and provides users with three core functions: intelligent AI Q&A, precise semantic search, and web data extraction. What is more worth mentioning is that through seamless collaboration with Univer tables, you only need to simply set the header, and the template can automatically complete data collection and filling, bringing data processing efficiency to a whole new level. I believe this intelligent template will become a powerful assistant in your work!

In the Univer Go operation interface, you only need to click to run the AI Data Enrichment script to automatically complete the data collection and filling in the table.Not only that, Univer Go also gives you the ability to deeply customize the script, so that you can truly use the tool in your hands. Whether you are dealing with complex business processes or turning creative work ideas into reality, it can accurately match your diverse needs and achieve your goals efficiently and easily.

Click to watch the automated office video that’s tailored for you, making your work more efficient and relaxing!: https://youtu.be/vlmFisF3DtE?si=BGu58Dqqp_Cs5zDH

Univer Go is a highly customizable spreadsheet tool that can build a spreadsheet with performance and functionality comparable to Excel based on user needs. It supports flexible functional expansion, covering basic data processing, complex import and export operations, and collaborative functions, while providing customization space for UI/UX design to help create an easy-to-use interactive interface.

In addition, Univer Go integrates advanced AI technologies and comes with powerful script writing and execution tools. It supports developers in creating and running automation scripts, connecting to databases, managing data reading and writing, and developing custom applications. Whether you're a beginner or a professional developer, its simple operation logic and rich feature support make it easy to get started.

Experience link: Univer Go

Achieving AI Data Enrichment:

  1. Client script custom interaction components

// Custom freeze conditions
sheet.setFrozenColumns(1);
sheet.setFrozenRows(2);

// Custom column headers
univerAPI.customizeColumnHeader({
    headerStyle: { textAlign: "left", fontSize: 12, size: COLUMN_HEADER_HEIGHT },
});

// Customize row height
for (let i = 0; i < 100; i++) {
    sheet.setRowHeight(i, 30);
}
sheet.setRowHeight(0, 40);

// Bind custom components to column headers
const rsGPT1 = sheet.addFloatDomToColumnHeader(
    1,
    {
        allowTransform: false,
        componentKey: "AIAgentSelect", // React comp key registered in ComponentManager
        props: {
            column: 1,
        },
        data: {
            defaultOption: "optionGPT",
            column: 1,
        },
    },
    {
        width: 210, // univer-float-dom-wrapper width 208 ai-gpt 206
        height: 58,
        marginX: 0,
        marginY: 0,
        horizonOffsetAlign: "right",
    },
    "ai-gpt" // dom id
);
  1. Python server script adds each agent to provide ai capabilities

def gpt(query: str):
    gpt_agent = Agent(
        name="GPT Agent",
        model=model,
        show_tool_calls=False,
        markdown=False,
        response_model=GPTResult,
        instructions=["Ask a question and get an answer, give me the briefest answer."],
    )

    resp: RunResponse = gpt_agent.run(query)

    s: GPTResult = resp.content

    ss = s.model_dump_json()
    print(ss)

    return ss

def web_reader(url: str):
  ...

def web_search(query: str, search_engine: str = 'google'):
  1. The client script calls the agent that executes the python script to obtain data

 const serverRespStr = await univerAPI.runOnServer("agent", "gpt", prompt);
 console.log("serverGPT:::", serverRespStr, "!!!!");

Ready-made templates for quick use!

  1. Please download Univer Go first, find AI Data Enrichment in the template, and click to use it

    Download Link:Univer Go

    Tutorial Video:Univer Go Intelligent Data Completion and Real-time Information Extraction

  2. Enter Workspace and wait for the dependency installation to complete

    1. The code editor on the right supports AI assisted writing. For details, please refer to this article:

      Univer Go Launches AI-Powered API Writing Assistance

  1. Adjust the code, preview the table, and run the code

  1. Preview the table header structure in the table: column header tool button and two lines of content below the column header
  • - Column header, click the tool button, there are multiple tools to choose from in the drop-down box

- GPT: Ask questions directly to LLM

- Web search: Search for information on the web.

- Read: Read documents and extract information

  • Two lines below the column header as part of the prompt words, where you can edit the prompt words in the "Description" section so that the AI model can better understand your needs.

  1. Next, we will demonstrate how to use the template. First, after selecting the target area, an "Execute" button will appear. After clicking it, the system will automatically complete the data in the previous column based on the tool selected in the current column and the prompt words of the current row and column.

  1. We can add some additional prompt words to adjust the question effect

  1. Use the Web Search tool to get real-time information from the Internet. When you click on the result cell generated by the Web Search, more related links will pop up in the sidebar for you to view.

  1. Use the Read tool to extract and summarize information from any public URL

  1. The above simple steps can help you easily realize automatic data collection and filling in the table! Log in to Univer Go now to explore a variety of customized functions and start a new experience of efficient office!
Â