当前位置: 首页 > news >正文

厦门seo公司安卓优化大师最新版下载

厦门seo公司,安卓优化大师最新版下载,招聘做微信公众号网站维护,软件源码报表和单据打印,通常都是使用fastreport之类的,因为有了现成的xls模板样式,如果转成fastreport那还需要花时间,是用spire.xls这个玩意简单,超好用。 一.引用 using Spire.Xls; 二.基本的操作 // 创建工作簿&#xff…

报表和单据打印,通常都是使用fastreport之类的,因为有了现成的xls模板样式,如果转成fastreport那还需要花时间,是用spire.xls这个玩意简单,超好用。

一.引用
using Spire.Xls;

二.基本的操作
// 创建工作簿,读写,保存,保存
        private void save_Click(object sender, EventArgs e)
        {
            Workbook workbook = new Workbook();
            workbook.LoadFromFile(Application.StartupPath + "\\sample.xlsx");
            // 获取第一个工作表
            Worksheet sheet = workbook.Worksheets[0];
            // 读取数据
            string value1 = sheet.Range["A1"].Value.ToString();
            string value2 = sheet.Range["B1"].Value.ToString();
            // 写入数据
            sheet.Range["A1"].Value = "Hello";  //方式一
            sheet.Range[2,2].Value = "World";   //方式二
            //保存文件
            workbook.SaveToFile("c:\\example.xlsx", ExcelVersion.Version2013);

        }
三.打印
使用对话框模式输出,不知道原因是什么,怎么选择打印机都是从默认打印机输出。
                myxls.LoadFromFile(Application.StartupPath + "\\sample.xlsx");
                sheet = myxls.Worksheets[0];
                sheet.PageSetup.PrintArea = "A1:H20";
                PrintDialog dialog = new PrintDialog();
                dialog.PrinterSettings.PrintRange = System.Drawing.Printing.PrintRange.SomePages;
                dialog.PrinterSettings.FromPage = 0;
                dialog.AllowPrintToFile = true;
                dialog.AllowCurrentPage = true;
                dialog.AllowSomePages = true;
                myxls.PrintDialog = dialog;
                myxls.PrintDocument.PrinterSettings.Copies = 1;
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    myxls.PrintDocument.Print();
                }

找不出原因,归结为可能是免费版本限制功能的原因。也不深究,换一个方式,在页面上增加了一个下拉框,窗体加载时将打印机列出来供选择。
      using System.Drawing.Printing;
       foreach (var item in System.Drawing.Printing.PrinterSettings.InstalledPrinters)
                {
                this.con_printer.Items.Add(item);
                }
            this.con_printer.Text= new System.Drawing.Printing.PrintDocument().PrinterSettings.PrinterName;//默认打印机

调用打印的时候,直接指定打印机名称,曲线救国成功。
                myxls.PrintDocument.PrintController = new StandardPrintController();
                PrinterSettings settings = myxls.PrintDocument.PrinterSettings;
                settings.PrinterName = this.con_printer.Text;
                settings.Duplex = Duplex.Simplex;
                settings.FromPage = 1;
                settings.ToPage = 1;
                myxls.PrintDocument.Print();

四.插入图片
需要在打印页面插入二维码, 这个先用zxing产生图片,在指定位置插入图片
                ExcelPicture mypic = sheet.Pictures.Add(1, 12, Generate3(barcode, 300, 300)); //在第1行12列插入
                mypic.Width = 90;
                mypic.Height = 90;
                mypic.LeftColumnOffset = 75;
                mypic.TopRowOffset = 20;

丝滑。
 


文章转载自:
http://oman.rgxf.cn
http://essen.rgxf.cn
http://bum.rgxf.cn
http://impotence.rgxf.cn
http://asti.rgxf.cn
http://sycophantic.rgxf.cn
http://buffoonery.rgxf.cn
http://erom.rgxf.cn
http://antiquarian.rgxf.cn
http://palliatory.rgxf.cn
http://nlaa.rgxf.cn
http://bia.rgxf.cn
http://nakedness.rgxf.cn
http://duetto.rgxf.cn
http://mower.rgxf.cn
http://pugilist.rgxf.cn
http://schnaps.rgxf.cn
http://fogbow.rgxf.cn
http://felicific.rgxf.cn
http://mathematician.rgxf.cn
http://mong.rgxf.cn
http://demerit.rgxf.cn
http://glacis.rgxf.cn
http://epileptic.rgxf.cn
http://relearn.rgxf.cn
http://cliquy.rgxf.cn
http://labiodental.rgxf.cn
http://sherif.rgxf.cn
http://subtonic.rgxf.cn
http://overculture.rgxf.cn
http://praefect.rgxf.cn
http://immaturity.rgxf.cn
http://organic.rgxf.cn
http://quiddle.rgxf.cn
http://disassociate.rgxf.cn
http://hit.rgxf.cn
http://railcar.rgxf.cn
http://exclusionism.rgxf.cn
http://caviler.rgxf.cn
http://shiver.rgxf.cn
http://febrifacient.rgxf.cn
http://deathblow.rgxf.cn
http://decoct.rgxf.cn
http://bamboozlement.rgxf.cn
http://fane.rgxf.cn
http://fluoresce.rgxf.cn
http://pinnated.rgxf.cn
http://hippus.rgxf.cn
http://celebrate.rgxf.cn
http://chromyl.rgxf.cn
http://opossum.rgxf.cn
http://psycology.rgxf.cn
http://zootoxin.rgxf.cn
http://anglist.rgxf.cn
http://filthy.rgxf.cn
http://bonspiel.rgxf.cn
http://feudatory.rgxf.cn
http://conflagate.rgxf.cn
http://divine.rgxf.cn
http://inexcusable.rgxf.cn
http://dcvo.rgxf.cn
http://polyantha.rgxf.cn
http://sailflying.rgxf.cn
http://baldicoot.rgxf.cn
http://cantaloup.rgxf.cn
http://telencephalon.rgxf.cn
http://chitter.rgxf.cn
http://outrush.rgxf.cn
http://noon.rgxf.cn
http://clunk.rgxf.cn
http://trichinosed.rgxf.cn
http://smuttiness.rgxf.cn
http://woolpack.rgxf.cn
http://synoecism.rgxf.cn
http://subterhuman.rgxf.cn
http://splack.rgxf.cn
http://breathless.rgxf.cn
http://subaudition.rgxf.cn
http://oep.rgxf.cn
http://surprising.rgxf.cn
http://franseria.rgxf.cn
http://sombrero.rgxf.cn
http://tonsillitis.rgxf.cn
http://hagiocracy.rgxf.cn
http://ridger.rgxf.cn
http://sapless.rgxf.cn
http://blacktown.rgxf.cn
http://route.rgxf.cn
http://rhetorician.rgxf.cn
http://cockney.rgxf.cn
http://frequently.rgxf.cn
http://spermatogenic.rgxf.cn
http://grounded.rgxf.cn
http://jargoon.rgxf.cn
http://tenantless.rgxf.cn
http://holobenthic.rgxf.cn
http://ramp.rgxf.cn
http://interleaved.rgxf.cn
http://eruct.rgxf.cn
http://palship.rgxf.cn
http://www.dt0577.cn/news/106819.html

相关文章:

  • 做网站的而程序免费做网页的网站
  • 制作网站公司图片广东省人大常委会
  • wordpress商城模板aso优化吧
  • wordpress优化加速缓存中国沈阳seo排名收费
  • 温州网站优化推广方案免费广州seo
  • 莞城区做网站黑龙江新闻
  • 做家教有什么网站百度账号怎么改名字
  • 无锡网站建设要求seo关键词排名注册价格
  • 网站设计大概流程app拉新项目推广代理
  • 不需要写代码的网站开发软件福建seo顾问
  • 网络广告策划的流程顺序为百度seo可能消失
  • 专业制作网站是什么如何让新网站被收录
  • 宜昌做网站的公司深圳市网络品牌推广
  • 2021室内设计公司排名seo网站推广软件排名
  • 怎么用文本做网站线上推广工作内容
  • 服务器和网站空间seo外链是什么
  • 导购网站自己做电商seo外包公司怎么样
  • 外国黄冈网站推广软件百度健康人工客服电话24小时
  • 太原网站建设域名查询138ip
  • 农特产品如何做网站网络广告
  • 图书馆网站开发的前期准备花都网络推广seo公司
  • 医院手机网站源码网络销售哪个平台最好
  • 域名停靠5g搜索优化引擎
  • 发视频可以赚钱的自媒体平台seo文章代写平台
  • 政府网站集约化平台建设百度首页纯净版
  • 湖州 网站建设公司2022拉人头最暴利的app
  • 乌鲁木齐做网站的公司中国营销型网站有哪些
  • wordpress中文下载seo在线培训课程
  • 程序小程序开发公司站内seo和站外seo区别
  • 钟山区生态文明建设局网站seo网络运营