1
我建一个表:出口的JavaScript表格Excel或安慰表
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)导出此表?
你将需要添加一些更多的信息。你指的是什么?这是在浏览器中?哪一个?还是使用JS MS Excel API?你想达到什么目的? – Alex
我只是想将此表导出为excel文件...浏览器或所指对象与此任务无关。 –
console.table只适用于某些浏览器版本。如果你想在Excel中使用这些数据,只需将它循环到服务器脚本中,并将其作为xls和html表格下载。 (它有点hacky,但excel将愉快地打开一个保存为xls文件的html表) – Alex