js读取没有表头的excel

js读取没有表头的excel,第1张

在Excel表格里,添上表头。

第一,打开表格,点击打印预览。第二,除了第一页外,都需要打印。第三,打开菜单栏里的页面布局选项卡,点击打印标题。第四,会d出页面设置对话框。第五,在打印标题下面有顶端标题行与左端标题列,点击右边小图标。第六,选中的表格第一页标题行,再点右边的小图标,确定,表头就添加上了。

<table class="cusTable">

<thead>

<tr>

<th data-colspan="50" data-align="center">就业情况</th>

</tr>

<tr>

<th data-colspan="5" data-align="center">就业</th>

<th data-colspan="5" data-align="center">就业</th>

<th data-colspan="5" data-align="center">就业</th>

</tr>

<tr>

<th data-field="ceshi">1</th>

<th data-field="ceshi">2</th>

<th data-field="ceshi">2</th>

<th data-field="ceshi">2</th>

<th data-field="ceshi">2</th>

<th data-field="ceshi">水平</th>

<th data-field="ceshi">水平</th>

<th data-field="ceshi">水平</th>

<th data-field="ceshi">水平</th>

<th data-field="ceshi">水平</th>

<th data-field="ceshi">测试</th>

<th data-field="ceshi">测试</th>

<th data-field="ceshi">测试</th>

<th data-field="ceshi">测试</th>

<th data-field="ceshi">测试</th>

</tr>

</thead>

</table>

引入bootstrap的js做出来是这样的,

将包放在项目文件之下之后。

以下是html中的代码:

<table id="dg" style="width:100%height:95%" data-options="

rownumbers:false,

singleSelect:true,

autoRowHeight:false,

pagination:true,

resizeHandle:'right'">

<thead>

<tr>

</tr>

</thead>

</table>

以下是js代码,是easyui的一种内置写法.

$('#dg').datagrid({

url:'datagrid_data.json',

columns:[[

{field:'id',title:'公司自编码',width:100},

{field:'name',title:'公司名称',width:100},

{field:'coding',title:'编码',width:100},

]]

})


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/bake/11459160.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-16
下一篇2023-05-16

发表评论

登录后才能评论

评论列表(0条)

    保存