Giter VIP home page Giter VIP logo

excel-microservice's Introduction

Excel Microservice

Microservice for Excel file manipulations using Apache POI.

Features

  • Use a JSON notation to inject string and numeric values into specified Excel cells and download the Excel file
  • Upload Excel templates based upon which values can be injected

Below is the description of the API calls.

1. Add Template

Upload an XLSX template and get the template ID for use in future calls.

  • URL

    /template/add

  • Method

    POST

  • Data Params

    Required:

    uploaded_file=[multipart]

  • Success Response:

    • Code: 200 Content: 077f6afb-50b4-486f-9a6d-1deae276b629

2. Get Template

Download a previously uploaded template based on a template ID.

  • URL

    /template/get

  • Method:

    GET

  • URL Params

    Required:

    templateId=[string]

    fileName=[string]

  • Success Response:

    • Code: 200
      Content: file

3. Excel Create

Create an Excel file without using a template. The data parameter is a JSON describing what value should be set in which cells. The structure is as follows:

{sheetIndex: {rowIndex: {cellIndex: {'value':'some value', 'type':'string'}}}}

The types can be:

string
number

Example:

{0: {1: {3: {'value':'Hello', 'type':'string'}, 4: {'value':'World', 'type':'string'}}}}

This will in the first sheet inject the strings 'Hello' in cell D2 and 'World' in E2.

  • URL

    /excel/create

  • Method

    POST

  • Body data[string]

  • Data Params

    Required: fileName=[string]

  • Header Content-Type: application/json

  • Success Response:

    • Code: 200 Content: file

4. Excel Inject

Inject data into an Excel file according to a previously added template. The data parameter uses the same format as that of the Excel Create call.

  • URL

    /excel/inject

  • Method

    POST

  • Body

    [string]

  • Data Params

    Required:

    fileName=[string]

    templateId=[string]

  • Success Response:

    • Code: 200 Content: file

excel-microservice's People

Contributors

gvdent avatar carvilsi avatar dependabot[bot] avatar dimitris-theodoropoulos 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.