导出javascript表格到Excel或控制台表

我build立了一个表格:

function insertTable(elementName, text, textColor, backgroundColor, relativeOffsetArea, fatherBC, scrollArea, offsetArea, clientArea) { this.elementName = elementName; this.text = text; this.textColor = textColor; this.backgroundColor = backgroundColor; this.relativeOffsetArea = relativeOffsetArea; this.fatherBC = fatherBC; this.scrollArea = scrollArea; this.offsetArea = offsetArea; this.clientArea = clientArea; } 

而我正在运行过程中添加到此表数据..

但是当我在这个代码中查看控制台日志中的填充表时:

  console.table(consoleResult,["elementName", "text", "textColor", "backgroundColor", "relativeOffsetArea", "fatherBC", "scrollArea", "offsetArea", "clientArea"]); 

最大行数是1000.控制台表限制在1000的长度吗? 你熟悉另一种方式(也许excel)导出此表?

console.table只适用于某些浏览器版本。 如果你想在Excel中的这个数据只是循环到服务器脚本,并将其下载为一个XLS和HTML表。 (它有点hacky,但Excel将愉快地打开一个HTML表保存为一个XLS文件)

在PHPinheritance人的一个例子: HTML表格到Excel – PHP