把数据库查询信息直接生成网页嵌入EXCEL表的格式,并可导出成EXCEL文件

作者:袖梨 2022-06-30
看了精华区中众多处理EXCEL的贴子,好象没有人写这种操作方法,我把我做过的写出来给大家参考一下。
1、先在FrongPage中新建一个网页,在网页中插入一个EXCEL组件(插入-WEB组件-EXCEL电子表格),然后把你要输出的数据格式输入该嵌入的EXCEL表格中,在组件中点右键-属性,可定义该组件的各部分定义项,做好后,查看源代码,得到该嵌入组件的源代码。
2、在VID中新建一ASP网页,复制上步骤中的源代码,然后针对数据列加入循环取数代码。如下:


css">
<!--tr
{mso-height-source:userset;}
td
{white-space:nowrap;}
.wc80A6909
{white-space:nowrap;
font-family:宋体;
mso-number-format:General;
font-size:auto;
font-weight:auto;
font-style:auto;
text-decoration:auto;
mso-background-source:auto;
mso-pattern:auto;
mso-color-source:auto;
text-align:general;
vertical-align:bottom;
border-top:none;
border-left:none;
border-right:none;
border-bottom:none;
mso-protection:locked;}
.wc01F2F7A
{white-space:nowrap;
font-family:宋体;

相关文章

精彩推荐