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

     

  • 相关阅读:
    统计内存使用情况
    自动化测试---PO设计模式
    初识xshell
    pip插件遇到问题(fetch URL https)
    为什么大家都热衷于挖矿呢?
    80个python练习以及python一些值得收藏的教程或博客
    面试问到一个,让你写一下朋友圈点赞功能的测试用例!记录一下
    ajax异步请求302
    Java学习
    MVC 带扩展名的路由无法访问
  • 原文地址:https://www.cnblogs.com/ike_li/p/1305657.html
Copyright © 2011-2022 走看看