Earn 4,500 ($45.00)
Google Apps Script Functions for Google Sheets: Cell Value and Formatting JSON Serialization and Deserialization functions
Bounty Description
Google Apps Script Functions for Google Sheets: Cell Value and Formatting JSON Serialization and Deserialization functions
#Problem Description
Looking to be able to copy google sheets data from a sheet to JSON and in reverse from JSON to a sheet. As part of this project, we need two core functions developed in Google Apps Script:
The first function should allow for the serialization of Google Sheets cells, converting both their values and formatting into a JSON object. This function should take a range of cells as input (with sheet reference), and output a JSON object that accurately represents the data and formatting of those cells.
The second function should allow for the deserialization of JSON objects back into Google Sheets cells. It should take as input a JSON object (representing cell values and formatting) and a starting cell location and sheet, and write the values and formatting represented by the JSON object into the cells of the sheet, starting from the given cell.
This project will solve the problem of transferring data and formatting between different Google Sheets in a structured and programmatically accessible way.
Unit tests must be written for both functions.
Acceptance Criteria
The first function must:
Take as input a range of cells in Google Sheets.
Convert all values and their respective formatting in the selected range into a JSON object.
Not alter the original Google Sheets data in the process.
The JSON object should accurately represent the cell values and their respective formatting.
The second function must:
Take as input a JSON object representing cell values and formatting and a starting cell location in Google Sheets.
Accurately write the values and formatting represented in the JSON object into the Google Sheets, starting from the specified cell location.
Not alter any cells outside of the range specified by the size of the JSON object and the starting cell location.
Both functions should handle all standard data types and formatting options present in Google Sheets below:
- Value/Formula
- Number Format
- Text Formatting
- Cell Color
- Font Color
- Font Family
- Font Size
- Rich Text
- Text Direction
- Text Rotation
- Vertical Alignment
- Wrap Strategy
- Checkbox
- Data Validation
- Border
- Note
- Bandings
- Background
- Font Line
- Horizontal Alignment
- Height
- Width