Forum


Replies: 11   Views: 3225
Change data chart from xlsx
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by Red Nacional de Refugios  · 20-11-2017 - 18:30

 i try it but  this is the error

CreateBarChart::$_rId as non static

 

 $docx = new DocxUtilities();
    
        $source = storage_path('reporteword2017/grafica1.docx');
        $target = storage_path('reporteword2017/grafica2.docx');
    
        $data = array();
        $data[0] = array(
            'title' => 'New titleaaaa',
            'legends' => array(
                'new legend',
            ),
            'categories' => array(
                'cat 1',
                'cat 2',
                'cat 3',
                'cat 4',
            ),
            'values' => array(
                array(25,12,22,33),
                array(25,12,22,33),
                array(25,12,22,33),
                array(25,12,22,33),
                array(25,12,22,33),
                array(25,12,22,33),
                array(25,12,22,33),
                array(25,12,22,33),
                array(25,12,22,33),
                array(25,12,22,33),
                array(25,12,22,33),
                array(25,12,22,33)
                
            ),
        );
        $docx->replaceChartData($source, $target, $data);