我正在尝试从图表中导出数据集,其中一行应从第二个x轴点开始。即数据集看起来像
var dataset = [
{ dept2:26, m:"Jan" },
{ dept1:30, dept2:38, m:"Feb" },
{ dept1:61, dept2:54, m:"Mar" },
{ dept1:65, dept2:67, m:"Apr" },
{ dept1:74, dept2:69, m:"May" },
{ dept1:74, dept2:69, m:"Jun" },
{ dept1:74, dept2:69, m:"Jul" }
];
完整摘要:http://webix.com/snippet/457ffa4e
但是,如果没有第一个值,Webix中的toExcel方法将不会导出列。我怎么能克服这个?
答案 0 :(得分:2)
尝试以这种方式定义输出:
$doc = new DOMDocument;
$doc->preserveWhiteSpace = false;
$doc->strictErrorChecking = false;
$doc->recover = true;
$doc->loadHTMLFile('test.php?u=user1&type=test');
$xpath = new DOMXPath($doc);
$query = "//div[@id='test']";
$entries = $xpath->query($query);
var_dump($entries->item(0)->textContent);