Spreadsheet Object
OmniToolbox provides a SpreadsheetObject which can be constructed and passed around as a pointer to manage a singular HTML spreadsheet, which can then later be imported into google sheets.
To use the spreadsheet object, you call Initialize and declare your headers.
Headers are the columns at the very top and dictate how far a row can get.
You then call AddRowByName and store the index.
You then call GetColumnIndexByHeader and store the index
To then modify a cell, you call EditCell and pass in the stored row and column index to modify the cell.
The file is then saved inside ProjectFolder/Saved/Spreadsheets whenever Save is called.
Why HTML?
Every solution I could find to generate a CSV or XLSX file that supported coloring cells required external libraries. These libraries are so popular that I could not find any reliable source of information to create my own without plainly copying the existing libraries. This would be a ton of work for very little gain.
Generating a table in HTML with colored cells is very simple and most excel programs can import HTML files, such as Google Sheets and Microsoft Excel.
Last updated