It can be useful to get the XML that's processed by the package sometimes. For instance, the package doesn't allow to directly get the inputValue provided by the Google Sheets API (which can contain formulas). You can also use the $entry->getXml->asxml() attribute of SimpleXMLElement and process the raw XML however you want
$cell_feed = $worksheet->getCellFeed();
foreach ($cell_feed->getEntries() as $entry) {
$column = $entry->getColumn();
$row = $entry->getRow();
// Fork here
$xml = $entry->getXml()->asxml(); // This will get the raw XML in a string (not used in this example)
$ns = $entry->getXml()->getNamespaces(true);
$attributes = $entry->getXml()->children($ns['gs'])->cell->attributes();
$values[] = $attributes['inputValue']; // $values will be an array containing all the raw formulas of the cell feed
// End of fork
}
It can be useful to get the XML that's processed by the package sometimes. For instance, the package doesn't allow to directly get the inputValue provided by the Google Sheets API (which can contain formulas). You can also use the
$entry->getXml->asxml()
attribute of SimpleXMLElement and process the raw XML however you want