zoukankan      html  css  js  c++  java
  • 使用xml来创建excel文档,运行时无需excel

    1.把以下代码复制到记事本里面,后缀名改成xls,根据需要修改所要的模板

    Code

    2.定义列数和行数方法

     sb1.AppendLine(String.Format("  <Table ss:ExpandedColumnCount=""{0}"" ss:ExpandedRowCount=""{1}"" x:FullColumns=""1""", cols.ToString, Rows.ToString))

    3. StringBuilder 另存对话框   

    Code

    4.直接保存到指定的地方

            Dim fileNamePath As String = FilePath + "R" + strSNO + ".xls"
            Dim sw As StreamWriter = New StreamWriter(fileNamePath)

             sw.WriteLine("......")

     

  • 相关阅读:
    linux死锁检测的一种思路【转】
    2016 最佳 Linux 发行版排行榜【转】
    kernel 3.10内核源码分析--TLB相关--TLB概念、flush、TLB lazy模式 【转】
    spin_lock & mutex_lock的区别? 【转】
    Linux输入子系统:多点触控协议 -- multi-touch-protocol.txt【转】
    Linux时间子系统之七:定时器的应用--msleep(),hrtimer_nanosleep()【转】
    ARM Linux 3.x的设备树(Device Tree)【转】
    设备树概述【转】
    Tslib的移植【转】
    带你制作百词斩单词表读写插件
  • 原文地址:https://www.cnblogs.com/ike_li/p/1305657.html
Copyright © 2011-2022 走看看