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. 在Centos下面FTP映射方案

    前两天公司要在一台Centos的机子上,把一些文件定时备份到另外一台ftp服务器上, 在Linux系统中,mount是不支持直接挂在"ftp://192.168.1.1/backup&quo ...

  2. SVM中径向基函数与高斯核的区别 Difference between RBF and Gaussian kernel in SVM

    Radial Basis Functions (RBFs) are set of functions which have same value at a fixed distance from a ...

  3. Oracle 11g数据库详细安装过程

    1.Oracle 11g下载 官方网址为:http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.h ...

  4. .NET中资源文件的使用

    工作需要,为VB.NET WinForm程序提供一个中英文界面切换功能,大方向有三个ini.XML.资源文件. 首先ini太过时,坚决不打算用.资源文件和XML相比提供了一个资源文件管理器,编写键值对 ...

  5. Kotlin入门(11)江湖绝技之特殊函数

    上一篇文章介绍了Kotlin对函数的输入参数所做的增强之处,其实函数这块Kotlin还有好些重大改进,集中体现在几类特殊函数,比如泛型函数.内联函数.扩展函数.尾递归函数.高阶函数等等,因此本篇文章就 ...

  6. (网页)JS和CSS不缓存方法,时间戳

    <link ..... href=".....css?time"+new Date()> <script type="text/javascript&q ...

  7. Selenium Webdriver 动态设置 Proxy

    Step 1: Visiting "about:config" driver.get("about:config"); Step 2 : Run script ...

  8. IP地址及子网划分

    1.IP地址 2.子网掩码 网络号全转为1,主机号全转为0,之后再转化为10进制表示. 3.无分类编址

  9. Python使用np.c_和np.r_实现数组转换成矩阵

    # -*- coding: utf-8 -*-"""Created on Sat Jun 30 14:49:22 2018 @author: zhen"&quo ...

  10. 洗礼灵魂,修炼python(55)--爬虫篇—知识补充—RFC 2616 http状态码

    不多说直接上状态码表: 状态码 含义 100 客户端应当继续发送请求.这个临时响应是用来通知客户端它的部分请求已经被服务器接收,且仍未被拒绝.客户端应当继续发送请求的剩余部分,或者如果请求已经完成,忽 ...