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("......")

     

  • 相关阅读:
    golang协程进行同步方法
    golang实现任务分发处理
    nginx lua获取客户端ip
    Ubuntu14.04手动创建桌面快捷方式
    SCRIPT1010: 缺少标识符 常见原因
    ubuntu下 mysql5.6.4 +sphinx安装
    bonobo server: git clone fatal: early EOF
    VS调试时不捕捉Exception
    PPC Windows Mobile判断网络(gprs)连接与否代码
    windows mobile 开发:让GPS一直在待机模式下也能运行
  • 原文地址:https://www.cnblogs.com/ike_li/p/1305657.html
Copyright © 2011-2022 走看看