string html = "<html><head><title>44444444</title>";
html += @"<style type='text/css'>
table {
border-collapse: collapse;
border: none;
width: 200px;
} td {
border: solid #000 1px;
}
</style>"; html+="</head><body>\r\n<table><tr style='color:#777;background: #eaeaea;'><td>aaaa</td><td>bbbb</td>"; if (exportOptionCtl1.checkBox1.IsChecked == true) {
html += "<td>" + exportOptionCtl1.checkBox1.Tag + "</td>";
}
if (exportOptionCtl1.checkBox2.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox2.Tag + "</td>";
}
if (exportOptionCtl1.checkBox3.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox3.Tag + "</td>";
}
if (exportOptionCtl1.checkBox4.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox4.Tag + "</td>";
}
if (exportOptionCtl1.checkBox5.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox5.Tag + "</td>";
} html += "</tr>"; for (int i = 0; i < 109; i++) { html += "<td>aaaaa" +i + "</td>";
html += "<td>bbbbb" + i + "</td>";
if (exportOptionCtl1.checkBox1.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox1.Tag + "</td>";
}
if (exportOptionCtl1.checkBox2.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox2.Tag + "</td>";
}
if (exportOptionCtl1.checkBox3.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox3.Tag + "</td>";
}
if (exportOptionCtl1.checkBox4.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox4.Tag + "</td>";
}
if (exportOptionCtl1.checkBox5.IsChecked == true)
{
html += "<td>" + exportOptionCtl1.checkBox5.Tag + "</td>";
}
html += "</tr>\r\n"; } html += "</table></body></html>"; StreamWriter w= File.CreateText("d:\\wx.html"); w.Write(html);
w.Flush();
w.Close();

  

<Grid x:Class="TestWpfApplication.ExportOptionCtl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="77" d:DesignWidth="417">
<Grid> <CheckBox Content="CheckBox1" Tag="ddd" Height="16" HorizontalAlignment="Left" Margin="6,6,0,0" Name="checkBox1" VerticalAlignment="Top" />
<CheckBox Content="CheckBox2" Tag="eee" Height="16" HorizontalAlignment="Left" Margin="91,6,0,0" Name="checkBox2" VerticalAlignment="Top" />
<CheckBox Content="CheckBox3" Tag="fff" Height="16" HorizontalAlignment="Left" Margin="167,6,0,0" Name="checkBox3" VerticalAlignment="Top" />
<CheckBox Content="CheckBox4" Tag="ggg" Height="16" HorizontalAlignment="Left" Margin="248,6,0,0" Name="checkBox4" VerticalAlignment="Top" />
<CheckBox Content="CheckBox5" Tag="hhh" Height="16" HorizontalAlignment="Left" Margin="6,37,0,0" Name="checkBox5" VerticalAlignment="Top" /> </Grid>
</Grid>

  

c# create html table test的更多相关文章

  1. when create a table,then show error ora-00952 tablespace tsb_1 not exist

    QUESTION:When create a table,then show error ora-00952 tablespace tsb_1 not exist. STEP: 1.select us ...

  2. IDEA的SonarLint插件报错Unable to create symbol table for

    执行sonarLint 报错: Unable to create symbol table for ***File won't be refreshed because there were erro ...

  3. SonarQube执行代码分析时,报错ERROR: Unable to create symbol table for : /**/*.java java.lang.IllegalArgumentException: Unsupported class file major version 55

    若要转载本文,请务必声明出处:https://www.cnblogs.com/zhongyuanzhao000/p/11686633.html 起因: 最近正在尝试SonarQube的简单使用,但是当 ...

  4. ORA-31633:unable to create master table "DP.SYS_EXPORT_FULL_11" ORA-01658

    问题描述:在进行数据泵进行数据库备份的时候,但是导出命令报错,环境是19C 4节点的rac 一体机.目前磁盘空间需要清理,清理之前先备份一下数据库 ORA-31626:job does not exi ...

  5. DB2 create partitioned table

    在Z上和开放平台上的创建方法还不太一样,两套人马开发出来的就是牛! 蛋疼…… 贴不同类型的几个例子感受一下,Z上的ASC,DESC不见了: CREATE TABLE foo(a INT) PARTIT ...

  6. CMD Create Database & Table

    Just do it: /* SQL 创建库 CREATE DATABASE jsp_demo DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; ...

  7. MySQL中临时表的基本创建与使用教程(create temporary table )

    当工作在非常大的表上时,你可能偶尔需要运行很多查询获得一个大量数据的小的子集,不是对整个表运行这些查询,而是让MySQL每次找出所需的少数记录,将记录选择到一个临时表可能更快些,然后在这些表运行查询. ...

  8. sqlalchemy create single table

    User.__table__.drop(engine) User.__table__.create(engine) https://stackoverflow.com/a/45287771/80250 ...

  9. 【SQL篇章--CREATE TABLE】

    [SQL篇章][SQL语句梳理 :--基于MySQL5.6][已梳理:CREATE TABLE][会坚持完善] SQL : 1. Data Definition Statements: 1.3 CRE ...

随机推荐

  1. WebLogic登录管理控制台、以及相关问题解决

    1.控制台的登录 登录地址是: http://管理实例IP:端口号/console 其中,管理实例的IP或者是管理实例所在主机的主机名 端口号默认7001 因此通过http://localhost:7 ...

  2. U8 应付款管理 单据类型 分析

    Ap_CloseBill   收付款单主表 Ap_CloseBills 收付款单子表 cVouchType 在收付款单主表中  ,用于区分单据为收款单还是付款单(48,49)  49:付款单 48:收 ...

  3. 第三方apk内置因签名导致SystemUI未启动启动问题案例分析

    这个问题是刷完机正常开机后,发现手机无状态栏,下拉通知栏,按音量键也无法出现VolumeDialog,开始看到这个现象感觉是systemUI未编译到版本中去?或者是在systemserver中syst ...

  4. MongoDB的基本操作:服务端启动,客户端连接,CRUD操作

    本文内容: MongoDB的介绍 MongoDB服务端的启动 MongoDB客户端连接 SQL与MongoDB相关概念解释 什么是BSON 数据库操作 集合操作 文档操作 测试环境:win10 软件版 ...

  5. C语言开发的思考

    维护过十万行代码的通信协议,自己从头开始开发过几万行的代码,步骤: 1.移植性.为移植性对数据类型做重新定义. 2.内存计数.不要直接使用malloc和free,而是给所有类型的内存申请定义类型,并计 ...

  6. ws协议的配置

    server { listen 80; server_name 域名或IP; rewrite ^(.*)$ https://$host$1 permanent; } server { listen 4 ...

  7. 解决Linux终端乱码的两则例子

    现象描述 我们先来说一下出现乱码的原因. 例子 先举个实际的例子,我们一般通过ssh远程到服务器上进行操作.当在终端上执行一些有输出的任务时,有可能会遇到乱码,特别是输出中有中文时. 比如,我登陆上o ...

  8. Nginx日志格式log_format详解

    PS:Nginx日志相关指令主要有两条,一条是log_format,用来设置日志格式,另外一条是access_log,用来指定日志文件的存放路径.类型.缓存大小等,一般放在Nginx的默认主配置文件/ ...

  9. SQL mysql优化

    慢查询 如何通过慢查日志发现有问题的SQL? 查询次数多且每次查询占用时间长的SQL pt-query-digest分析前几个查询 IO大的SQL pt-query-diges分析中的Rows exa ...

  10. 4.1Python数据类型(1)之数值类型

    返回总目录 目录: 1.数据类型的表现形式: 2.数据进制的转换: 3.数据的常规操作: (一).数据类型的表现形式: (1)整数类型: # 二进制: a = 0b0110 print("二 ...