AppsScriptPulse

UtlApp: A Versatile Google Apps Script Library for array, binary, and string processing

This is a Google Apps Script library including useful scripts for supporting to development of applications by Google Apps Script. In the current stage, the 3 categories “For array processing”, “For binary processing”, and “For string processing” are included in this library.

Google Apps Script developers often find themselves grappling with repetitive tasks particularly when handling Google Sheets data like array manipulation and A1 notation handling. Fortunately, this little versatile library from Kanshi Tanaike called UtlApp is here to help you simplify many of these common challenges.

Array Processing Made Easy

UtlApp includes a number of powerful array processing methods that can significantly streamline your code. Need to rearrange your data? The transpose method makes it effortless to flip your rows and columns. Want to extract specific data points? getSpecificColumns allows you to pinpoint and retrieve the exact columns you need. Dealing with large datasets? Quickly identify the first empty row or column using get1stEmptyRow and get1stEmptyColumn. And when it’s time to convert your array data into a more structured format, convArrayToObject can transform it into a JSON object, ready for further manipulation or integration.

Simplifying String Processing

UtlApp helps with common string processing tasks specifically for Google Sheets users. With columnLetterToIndex and columnIndexToLetter, you can convert between column letters and indices, making it simpler to work with spreadsheet data. UtlApp also offers convenient methods for managing A1Notations, such as consolidating scattered ranges using consolidateA1Notations or expanding them with expandA1Notations.

Handling Binary Data

UtlApp doesn’t stop at arrays and strings; it can also handle Blobs with the blobToDataUrl method. This function can convert Blob data into a convenient data URL format, making it suitable for embedding images or other binary content directly within HTML or CSS. This simplifies the process of working with Blobs in web-based Google Apps Script applications.

Effortless Integration

Adding UtlApp to your Google Apps Script project is a breeze! You have three convenient options: add the library directly using its project key, copy the individual script source files for array, binary, and string processing or copy individual functions  into your project.

To find out more follow the source link to the GitHub repository.

Source: GitHub – tanaikech/UtlApp

Leave a Reply

Your email address will not be published. Required fields are marked *