-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Description
This is:
- [ x] a feature request
What is the expected behavior?
Accept formatting instructions, if present
What is the current behavior?
Everything is parsed as text
What are the steps to reproduce?
Read the attached file with XML reader and save as XLSX.
What features do you think are causing the issue
- [x ] Reader
Does an issue affect all spreadsheet file formats? If not, which formats are affected?
XML reader only
I implemented the desired behaviour in Xml::loadIntoExisting() in a rather brute-force way like follows (untested); there might be a much better way to extract the inner content of the SimpleXMLElement:
case 'String':
$type = DataType::TYPE_STRING;
$rich = $cellData->children('http://www.w3.org/TR/REC-html40');
if ($rich) {
# in case of HTML content we extract the payload
# and convert it into a rich text object
$content = $cellData->asXML();
$start = strpos($content, '<', 1);
$end = strrpos($content, '<');
$content = substr($content, $start, $end-$start);
$html = new Helper\Html();
$cellValue = $html->toRichTextObject($content);
}
break;
Metadata
Metadata
Assignees
Labels
No labels