Giter VIP home page Giter VIP logo

jsbarcode-spreadsheet-connector's Introduction

Google SpreadSheet Barcode Generator

日本語      中文
Google SpreadSheet is a highly practical online spreadsheet system.
However, it lacks sufficient support for barcode generation; currently, the only method available online is simple barcode generation using the Libre Barcode font.
This method does not produce ideal barcodes, such as EAN/JAN codes, and does not support a comprehensive range of formats. To support a wider array of barcode formats, I utilized a mature js library - JsBarcode.
Using the underlying functionality of JsBarcode to generate barcode data, I used Google SpreadSheet's Sparkline function to draw the barcode graphics. This drawing approach was inspired by this repository.
However, due to the limited drawing capabilities of the Sparkline function, it cannot draw text, variable line lengths, etc., which is a drawback.

Also, this library utilizes clasp for local development of GAS (Google Apps Script). For more details, see the related documentation.

Basic Usage Process:

1. Clone the code

git clone https://github.com/tomcatliu2016/jsbarcode-spreadsheet-connector

2. Install dependencies

cd jsbarcode-spreadsheet-connector && npm install

3. Log in with clasp

clasp login

4. Create a GAS project or set an existing project's Script ID to .clasp.json

clasp create --type sheets --title "JsBarcodeSpreadSheetConnector" --rootDir ./dist

5. build locally

npm run build

6. Push the code to GAS server

clasp push

7. Complete the compile and push steps at once

npm run deploy

8. Open the Google SpreadSheet and use the custom function

clasp open

9. Use the custom function in the Google SpreadSheet

=sparkline(EAN13(A1), BarcodeOpt())

Sample Image

[As Shown]

jsbarcode-spreadsheet-connector's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.