I have been trying to fetch data from Google Sheets to my web frontend using the API endpoint, https://docs.google.com/spreadsheets/d/{spreadSheetId}/gviz/tq?&sheet={sheetId}
. But I realize it strips all the rich-text formatting (i.e. span, italics) within the spreadsheet. I also tried to fetch https://docs.google.com/spreadsheets/d/{spreadSheetId}
directly. While it provides an HTML that retains the stylings, the data gets cut off after a certain row.
Is there a way to query Google Sheets to make it retain the original rich text formatting?
The only simple way I found that allowed me to complete my requirement was to first publish the spreadsheet, then fetch from the published URL. That way, the data isn't cut off like it would from the docs.google.com
endpoint.