php - How to read Google Sheets text preserving font formatting

I'm considering using spreadsheets as a backed for simple website and tweaking reading google sheets data into html. When reading it, api prints only raw text. Is there a way to read cell text with formatting (bold, italic, spaces, newlines etc.)?
$range = 'Sheet1!A1:A5';
$response = $service->spreadsheets_values->get($spreadsheetId, $range);
$values = $response->getValues();
if (empty($values)) {
print 'No data found.\n';
} else {
foreach ($values as $row) {
for ($i = 0; $i < sizeof($row); $i++) {
echo $row[$i];
echo "<br/>";
}
}
}
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: the browser (or proxy) sent a request that this server could not understand.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.