Convert Figma logo to code with AI

dream-num logoLuckysheet

Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source.

15,854
2,352
15,854
685

Top Related Projects

JavaScript data grid with a spreadsheet look & feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚡

34,966

📗 SheetJS Spreadsheet Data Toolkit -- New home https://git.sheetjs.com/SheetJS/sheetjs

13,539

Excel Workbook Manager

12,496

The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.

Quick Overview

Luckysheet is an open-source spreadsheet component library for web applications. It provides a powerful, feature-rich Excel-like experience directly in the browser, allowing developers to integrate spreadsheet functionality into their web projects with ease.

Pros

  • Rich feature set comparable to traditional desktop spreadsheet applications
  • Highly customizable and extensible through plugins and APIs
  • Supports collaborative editing and real-time data synchronization
  • Cross-browser compatibility and responsive design

Cons

  • Large file size may impact initial load times for web applications
  • Documentation is primarily in Chinese, which may be challenging for non-Chinese speakers
  • Steeper learning curve compared to simpler spreadsheet libraries
  • Some advanced features may require additional configuration or plugins

Code Examples

  1. Basic initialization:
const options = {
    container: 'luckysheet',
    data: [
        {
            name: "Sheet1",
            celldata: [
                {r:0, c:0, v: "Hello"},
                {r:0, c:1, v: "Luckysheet"}
            ]
        }
    ]
};
luckysheet.create(options);
  1. Adding a custom toolbar button:
luckysheet.create({
    // ... other options
    plugins: ['chart'],
    hook: {
        toolbarClick: function(event, info) {
            if (info.id === 'mycustombutton') {
                // Custom button action
                alert('Custom button clicked!');
            }
        }
    },
    toolbarConfig: {
        custom: true,
        toolbarList: [
            // ... default toolbar items
            {
                text: 'Custom Button',
                id: 'mycustombutton'
            }
        ]
    }
});
  1. Accessing and modifying cell data:
// Get value of cell A1
const value = luckysheet.getCellValue(0, 0);

// Set value of cell B2
luckysheet.setCellValue(1, 1, 'New Value');

// Update multiple cells
luckysheet.updateCell([
    {r: 2, c: 2, v: 10},
    {r: 2, c: 3, v: 20}
]);

Getting Started

  1. Include Luckysheet files in your HTML:
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/css/pluginsCss.css' />
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet/dist/css/luckysheet.css' />
<script src="https://cdn.jsdelivr.net/npm/luckysheet/dist/plugins/js/plugin.js"></script>
<script src="https://cdn.jsdelivr.net/npm/luckysheet/dist/luckysheet.umd.js"></script>
  1. Create a container element:
<div id="luckysheet" style="margin:0px;padding:0px;position:absolute;width:100%;height:100%;left: 0px;top: 0px;"></div>
  1. Initialize Luckysheet:
luckysheet.create({
    container: 'luckysheet',
    data: [{ name: "Sheet1" }]
});

Competitor Comparisons

JavaScript data grid with a spreadsheet look & feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚡

Pros of Handsontable

  • More mature and feature-rich, with a longer development history
  • Extensive documentation and API reference
  • Offers both open-source and commercial versions with additional features

Cons of Handsontable

  • Steeper learning curve due to its extensive feature set
  • Commercial license required for some advanced features
  • Larger file size, which may impact load times for smaller projects

Code Comparison

Handsontable:

const hot = new Handsontable(container, {
  data: data,
  rowHeaders: true,
  colHeaders: true,
  filters: true,
  dropdownMenu: true
});

Luckysheet:

luckysheet.create({
  container: 'luckysheet',
  data: [{ name: 'Sheet1', celldata: data }],
  showinfobar: false
});

Key Differences

  • Handsontable uses a more traditional JavaScript approach, while Luckysheet has a simpler API
  • Luckysheet is fully open-source, whereas Handsontable has both open-source and commercial versions
  • Handsontable offers more built-in features and customization options out of the box

Use Cases

  • Choose Handsontable for complex, feature-rich spreadsheet applications with specific requirements
  • Opt for Luckysheet for simpler, open-source projects or when a more Excel-like interface is desired
34,966

📗 SheetJS Spreadsheet Data Toolkit -- New home https://git.sheetjs.com/SheetJS/sheetjs

Pros of SheetJS

  • Mature and widely adopted library with extensive documentation
  • Supports a wide range of spreadsheet formats (XLS, XLSX, CSV, etc.)
  • Lightweight and efficient, suitable for both browser and Node.js environments

Cons of SheetJS

  • Primarily focused on data parsing and manipulation, not UI rendering
  • Requires additional libraries or custom code for spreadsheet visualization
  • Commercial use may require purchasing a license

Code Comparison

SheetJS:

import * as XLSX from 'xlsx';

const workbook = XLSX.utils.book_new();
const worksheet = XLSX.utils.json_to_sheet(data);
XLSX.utils.book_append_sheet(workbook, worksheet, "Sheet1");
XLSX.writeFile(workbook, "output.xlsx");

Luckysheet:

luckysheet.create({
    container: 'luckysheet',
    data: [{ name: "Sheet1", celldata: [{ r: 0, c: 0, v: "Hello" }] }],
    showtoolbar: true,
    showgridlines: true
});

Summary

SheetJS excels in data processing and format support, making it ideal for backend operations or headless spreadsheet manipulation. Luckysheet, on the other hand, provides a full-featured spreadsheet UI component, similar to Excel or Google Sheets, making it more suitable for web applications requiring interactive spreadsheet functionality. The choice between the two depends on whether you need data processing capabilities or a complete spreadsheet interface.

13,539

Excel Workbook Manager

Pros of exceljs

  • More mature and widely adopted project with extensive documentation
  • Supports both reading and writing Excel files (.xlsx, .csv, etc.)
  • Offers a wide range of Excel-specific features and formatting options

Cons of exceljs

  • Primarily focused on server-side Excel file manipulation
  • Lacks built-in UI components for spreadsheet editing
  • Steeper learning curve for complex operations

Code Comparison

exceljs:

const workbook = new ExcelJS.Workbook();
const worksheet = workbook.addWorksheet('Sheet1');
worksheet.getCell('A1').value = 'Hello, World!';
await workbook.xlsx.writeFile('output.xlsx');

Luckysheet:

const options = {
  container: 'luckysheet',
  data: [{ name: 'Sheet1', celldata: [{ r: 0, c: 0, v: 'Hello, World!' }] }]
};
luckysheet.create(options);

Key Differences

  • Luckysheet is a full-featured spreadsheet component for web applications, offering a UI similar to Excel
  • exceljs focuses on programmatic Excel file manipulation without a built-in UI
  • Luckysheet is better suited for in-browser spreadsheet editing, while exceljs excels at server-side processing
  • exceljs provides more advanced Excel-specific features and formatting options
  • Luckysheet offers real-time collaboration features out of the box

Both libraries have their strengths, and the choice between them depends on the specific requirements of your project, such as whether you need a UI component or server-side processing capabilities.

12,496

The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.

Pros of ag-grid

  • More mature and feature-rich, with extensive documentation and enterprise support
  • Highly performant, capable of handling large datasets efficiently
  • Offers a wide range of built-in functionality like filtering, sorting, and grouping

Cons of ag-grid

  • Steeper learning curve due to its complexity and extensive API
  • Licensing costs for enterprise features can be expensive for some projects
  • Less focused on spreadsheet-like functionality compared to Luckysheet

Code Comparison

ag-grid:

const gridOptions = {
  columnDefs: [
    { field: 'make' },
    { field: 'model' },
    { field: 'price' }
  ],
  rowData: [
    { make: 'Toyota', model: 'Celica', price: 35000 }
  ]
};

Luckysheet:

const options = {
  container: 'luckysheet',
  data: [
    {
      name: 'Sheet1',
      celldata: [
        { r: 0, c: 0, v: 'Toyota' },
        { r: 0, c: 1, v: 'Celica' },
        { r: 0, c: 2, v: 35000 }
      ]
    }
  ]
};

Both libraries offer ways to define and populate grid data, but ag-grid uses a more structured approach with column definitions and row data, while Luckysheet uses a cell-based model similar to traditional spreadsheets.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

English| 简体中文

Luckysheet is no longer maintained, please use Univer instead!

Follow the #1454 issue for more details.

Introduction

🚀Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source.

Links

Source CodeDocumentationDemoPlugins DemoForum
GithubOnline DocumentationOnline Demo / Cooperative editing demoImport Excel DemoChinese Forum
Gitee MirrorGitee Online DocumentationGitee Online DemoGitee Import Excel DemoGoogle Group

Demo

Plugins

Ecosystem

ProjectDescription
Luckysheet VueLuckysheet and Luckyexcel in a vue cli3 project
Luckysheet Vue3Luckysheet and Luckyexcel in a vue3 project with vite
Luckysheet ReactLuckysheet in a React project
Luckyexcel NodeUse Luckyexcel in koa2
Luckysheet ServerJava backend Luckysheet Server
Luckysheet Server StarterLuckysheetServer docker deployment startup template

Features

  • Formatting: style, conditional formatting, text alignment and rotation, text truncation, overflow, automatic line wrapping, multiple data types, cell segmentation style
  • Cells: drag and drop, fill handle, multiple selection, find and replace, location, merge cells, data verification
  • Row & column: hide, insert, delete rows or columns, freeze, and split text
  • Operation: undo, redo, copy, paste, cut, hot key, format painter, drag and drop selection
  • Formulas & Functions: Built-in, remote and custom formulas
  • Tables: filter, sort
  • Enhanced functions: Pivot tables, charts, comments, cooperative editing, insert picture, matrix calculations, screenshots, copying to other formats, EXCEL import and export, etc.

For a more detailed feature list, please refer to: Features

📖 Resources

  • Priority reading for new users: User Guide
  • For the tutorials, learning materials and supporting solutions provided by the community, please refer to: Tutorials and Resources

📜 Changelog

Detailed changes for each release are documented in the CHANGELOG.md.

❗️ Issues

Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.

✅ TODO

Managed with GitHub Projects

💪Contribution

Please make sure to read the Contributing Guide before making a pull request.

Usage

First step

Introduce dependencies through CDN

<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/css/pluginsCss.css' />
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/plugins.css' />
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/css/luckysheet.css' />
<link rel='stylesheet' href='https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/assets/iconfont/iconfont.css' />
<script src="https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/plugins/js/plugin.js"></script>
<script src="https://cdn.jsdelivr.net/npm/luckysheet@latest/dist/luckysheet.umd.js"></script>

Second step

Specify a table container

<div id="luckysheet" style="margin:0px;padding:0px;position:absolute;width:100%;height:100%;left: 0px;top: 0px;"></div>

Third step

Create a table

<script>
    $(function () {
        //Configuration item
        var options = {
            container: 'luckysheet' //luckysheet is the container id
        }
        luckysheet.create(options)
    })
</script>

Development

Requirements

Node.js Version >= 6

Installation

npm install
npm install gulp -g

Development

npm run dev

Package

npm run build

Partner project

Communication

Chinese community

Sponsor

Luckysheet is an MIT-licensed open source project with its ongoing development made possible entirely by the support of these awesome backers. If you'd like to join them, please consider:

PayPalWeChatAlipay
Paypal Me

What's the difference between Patreon and OpenCollective?

Funds donated via Patreon go directly to support mengshukeji's work on Luckysheet. Funds donated via OpenCollective are managed with transparent expenses and will be used for compensating work and expenses for core team members or sponsoring community events. Your name/logo will receive proper recognition and exposure by donating on either platform.

Sponsors List

(Sort by time)

  • *涛 Â¥ 200
  • popo Â¥ 1
  • 孔垂善 Â¥ 5
  • Shawn文 Â¥ 99
  • 幸运的小路易 Â¥ 1
  • 冯启俊 Â¥ 88
  • mxb Â¥ 10
  • 祭阳 Â¥ 20
  • *勇 Â¥ 30
  • 虚我 Â¥ 200
  • 甜党 Â¥ 50
  • Alphabet(Google)-gcf Â¥ 1
  • **å¹³ Â¥ 100
  • **东 Â¥ 10
  • debugger Â¥ 20
  • 烦了烦 Â¥ 10
  • 文顶顶 Â¥ 200
  • yangxshn Â¥ 10
  • 爱乐 Â¥ 100
  • 小李飞刀刀 Â¥ 66
  • 张铭 Â¥ 200
  • 曹治军 Â¥ 1
  • *特 Â¥ 10
  • **权 Â¥ 9.9
  • **sdmq Â¥ 20
  • *旭 Â¥ 10
  • Quentin Â¥ 20
  • 周宇凡 Â¥ 100
  • *超 Â¥ 10
  • 维宁 Â¥ 100
  • hyy Â¥ 20
  • 雨亭寒江月 Â¥ 50
  • **功 Â¥ 10
  • **光 Â¥ 20
  • terrywan Â¥ 100
  • 王晓洪 Â¥ 10
  • Sun Â¥ 10
  • 忧绣 Â¥ 100
  • Jasonx Â¥ 10
  • 国勇 Â¥ 66.6
  • 郎志 Â¥ 100
  • 匿名 Â¥ 1
  • ni Â¥ 100
  • 苏 Â¥ 50
  • Mads_chan Â¥ 1
  • LK Â¥ 100
  • 智连方舟 李汪石 Â¥ 168
  • **发 Â¥ 260
  • *超 Â¥ 10
  • *勇 Â¥ 10
  • *腾 Â¥ 15
  • 名字好难起 Â¥ 20
  • 大山 Â¥ 1
  • waiting Â¥ 1000
  • **宇 Â¥ 10.00
  • 刘小帅的哥哥 Â¥ 20.00
  • 宁静致远 Â¥ 10.00
  • Eleven Â¥ 1.00
  • **帆 Â¥ 188
  • henry Â¥ 100
  • .波罗 Â¥ 50
  • 花落有家 Â¥ 50
  • 踏遍南水北山 Â¥ 1
  • LC Â¥ 5
  • **明 Â¥ 8.80
  • *军 Â¥ 20
  • 张彪 Â¥ 50
  • 企业文档云@肖敏 Â¥ 10
  • 匿名 Â¥ 50
  • 逍遥行 Â¥ 10
  • z.wasaki Â¥ 50
  • Make Children Â¥ 20
  • Foam Â¥ 20
  • 奥特曼( o|o)ノ三 Â¥ 50
  • **凯 Â¥ 10
  • **兵 Â¥ 20
  • **川 Â¥ 1
  • 二万 Â¥ 50
  • 蔚然成林 Â¥ 10
  • 邹杰 Â¥ 10
  • 张永强 Â¥ 50
  • 鱼得水 Â¥ 50
  • Ccther Â¥ 1
  • Eric Cheng Â¥ 10
  • 佚名 Â¥ 1
  • 花叶 Â¥ 50
  • GT Â¥ 20
  • 菜菜心 Â¥ 10
  • fisher Â¥ 1
  • JC Â¥ 5
  • 佚名 Â¥ 20
  • 独孤一剑 Â¥ 50
  • mxt Â¥ 20
  • 一叶迷山 Â¥ 100
  • Jeff Â¥ 100
  • 八千多条狗🐶 Â¥ 100
  • 晓峰 Â¥ 10
  • 戒 Â¥ 1
  • 浪里个浪 Â¥ 1
  • 回调函数 Â¥ 50
  • 赖瓜子 Â¥ 5
  • Milo•J Â¥ 20
  • 可道云 Â¥ 200
  • *程 Â¥ 10
  • 来一杯卡布酸奶 Â¥ 5
  • 刘久胜 Â¥ 100
  • 快意江湖 Â¥ 50
  • *新 Â¥ 9.9
  • **龙 Â¥ 100
  • **江 Â¥ 100
  • **威 Â¥ 9.8
  • **涛 Â¥ 500
  • **嘉 Â¥ 10
  • *涛 Â¥ 1
  • *兵 Â¥ 5
  • *阳 Â¥ 200
  • *辉 Â¥ 1
  • *帆 Â¥ 30
  • **旺 Â¥ 10
  • **麟 Â¥ 20
  • *霖 Â¥ 9.9
  • *帅 Â¥ 10
  • *鑫 Â¥ 6.66
  • ~朴:shu Â¥ 29.79
  • 未来 Â¥ 1
  • 国勇 Â¥ 0.1
  • 用心灵听雨 Â¥ 10
  • 钊 Â¥ 5
  • 星稀 Â¥ 5

Authors and acknowledgment

Active Core Team Members

Community Partners

License

MIT

Copyright (c) 2020-present, mengshukeji

NPM DownloadsLast 30 Days