forguncy-web-operator

Provides functionality to interact with SpreadJS tables in the web applications built by Forguncy (aka 活字格), specifically for extracting table data and column headers. Use this skill when you need to programmatically read content from tables within a Forguncy web page by dynamically identifying the table's "fgcname" attribute.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "forguncy-web-operator" with this command: npx skills add kadbbz/forguncy-web-operator

Forguncy Web Operations (forguncy-web-operator)

This skill allows you to extract data and headers from SpreadJS tables within the web applications built by Forguncy (aka 活字格).

How to use

The following JavaScript snippets can be executed in the browser context using the browser.act tool with kind: "evaluate" to retrieve data from a SpreadJS table.

Dynamically Get Table Name (fgcname)

First, you need to identify the fgcname of the SpreadJS table. You can find this by inspecting the DOM or using a JavaScript snippet like this to find elements with fgc-uielement="listview" and extract their fgcname:

(function() {
    const listViews = document.querySelectorAll('[fgc-uielement="listview"]');
    let fgcNames = [];
    listViews.forEach(lv => {
        if (lv.hasAttribute('fgcname')) {
            fgcNames.push(lv.getAttribute('fgcname'));
        }
    });
    return fgcNames;
})()

Once you have the fgcname (e.g., "表格1"), you can use it in the following functions.

Get Table Data

To get the full table data in CSV format (rows separated by '\r', columns by ','), replace YOUR_TABLE_FGCNAME with the actual fgcname you found:

(function() {
    const tableName = "YOUR_TABLE_FGCNAME"; // Replace with the actual fgcname, e.g., "表格1"
    var sheet = Forguncy.Page.getListView(tableName).getControl().getActiveSheet();
    return sheet.getCsv(0,0,sheet.getRowCount(), sheet.getColumnCount(),"\r",",");
})()

Get Column Headers

To get the column headers, assuming there are 2 header rows (adjust headerRowCount if necessary), replace YOUR_TABLE_FGCNAME with the actual fgcname:

(function() {
    const tableName = "YOUR_TABLE_FGCNAME"; // Replace with the actual fgcname, e.g., "表格1"
    var sheet = Forguncy.Page.getListView(tableName).getControl().getActiveSheet();
    var headerRowCount = sheet.getRowCount(GC.Spread.Sheets.SheetArea.colHeader); 
    var headers = [];
    for (let r = 0; r < headerRowCount; r++) {
        var rowHeaders = [];
        for (let c = 0; c < sheet.getColumnCount(); c++) {
            rowHeaders.push(sheet.getValue(r, c, GC.Spread.Sheets.SheetArea.colHeader));
        }
        headers.push(rowHeaders);
    }
    return headers;
})()

Remember to pass the targetId obtained from a browser.open or browser.snapshot call when executing these scripts.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Wechat Mp Writer

WeChat Official Account (公众号) content writer with article formatting, headline optimization, and engagement tips. Use when you need to write WeChat articles,...

Registry SourceRecently Updated
General

OpenClaw EverMemory Installer

Use this skill when installing, upgrading, verifying, or publishing the EverMemory OpenClaw plugin and its companion skill, including local path install, npm...

Registry SourceRecently Updated
General

Ip Advisor

知识产权顾问。专利、版权、商业秘密、注册流程、保护策略。IP advisor for patents, copyrights, trade secrets. 知识产权、专利、版权。

Registry SourceRecently Updated
1950ckchzh
General

炒股大师模拟器

炒股大师模拟器 | 股市模拟交易练习 | A股/港股/美股投资学习 | 化身文主任/股神老徐/炒股养家/孙宇晨等各位大师学习投资思路 | 多智能体股票讨论群

Registry SourceRecently Updated