Skip to content

Repository files navigation

CO-PO-Attainment-Generator Helper App

This repository contains a helper application for the main CO-PO-Attainment-Generator app. It's designed to handle specific operations like updating cells and inserting columns in Excel files, providing essential functionality to the main application.

Usage

This helper app is meant to be used in conjunction with the main CO-PO-Generator app. It takes a JSON string as input, which specifies the operations to perform on the Excel file.

The JSON string (as given by struct_operation.go) should be in the following format:

{
    "type": "updateCells",
    "sheet": "Sheet1",
    "column": "A",
    "count": 3,
    "mappings": {
        "A1": "New Value"
    }
}

Each operation object should have the following properties:

  • type: The type of operation. Supported types are updateCells, removeColumn, insertColumn, hideColumn, showColumn, hideSheet, and showSheet.
  • sheet: The name of the sheet on which to perform the operation.
  • column: The name of the column for column-specific operations. This is optional and not needed for updateCells, hideSheet, and showSheet operations.
  • count: The number of times to perform the operation. This is optional and not needed for updateCells, hideSheet, and showSheet operations.
  • mappings: A map of cell addresses to values for the updateCells operation. This is optional and not needed for other operations.

Command-Line Flags

The program supports the following command-line flags:

Examples

Here are a few examples of how to use the application:

  • To perform operations specified in a JSON string:

    go run main.go -v v1 -op '[{"type": "updateCells", "sheet": "START", "mappings": {"C06": "Test", "C07": "Test Position"}}]' -i input.xlsx -o output.xlsx
  • To perform operations specified in a file:

    go run main.go -v v1 -op "$(cat operations.json)" -i input.xlsx -o output.xlsx
  • To use the test operations for debugging:

    go run main.go -v v1 -op test -i input.xlsx -o output.xlsx

About

Excel-Writer is a modular Node.js utility designed to automate the creation and export of Excel (.xlsx) files from structured data sources. It leverages the ExcelJS library for high-performance workbook generation, supporting advanced formatting, multiple sheets, styling, and custom templates.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages