Skip to content
This repository was archived by the owner on May 19, 2024. It is now read-only.
This repository was archived by the owner on May 19, 2024. It is now read-only.

"Unknown format "html"" #28

@catasoft

Description

@catasoft

Hello,
I use sonata with Symfony, but I also tried a route in a controller outside of sonata and the error is the same.

public function reportType2Action(Request $request, $id) {
   //...
    return $this->render('DataBundle:DataValue:report-type2.xls.twig', array('entities' => $query->getResult()));
}

Template file:

{# DataBundle:DataValue:report-type2.xls.twig #}
{% xlsdocument %}
    {% xlssheet 'Worksheet' %}
        {% xlsrow %}
            {% xlscell %}{% trans %}IA Id{% endtrans %}{% endxlscell %}

        {% endxlsrow %}
        {% for r in entities %}
            {% if r.reference is not empty %}
                {% xlsrow %}
                    {% xlscell %}{{ r.value.evidenceLevel }}{% endxlscell %}
                {% endxlsrow %}
            {% endif %}
        {% endfor %}
    {% endxlssheet %}
{% endxlsdocument %}

Somehow, in PhpExcelWrapper.php, startDocument($properties) is called with an empty array instead of [format: 'xls'].

Thank you for your help!
Catalin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions