社区
C语言
帖子详情
Nothing
HUANGCONG
2001-10-29 04:07:39
毕业了,该不该去IBM公司应聘?
...全文
46
回复
打赏
收藏
Nothing
毕业了,该不该去IBM公司应聘?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
Microsoft.Office.Interop.Word.dll
Microsoft.Office.Interop.Word.dll 事例如 object Nothing = System.Reflection.Missing.Value; object srcFileName = @"D:\aa.html"; object dstFileName = @"d:\li.doc"; object objt = true; Word.Application wordApp = new Word.ApplicationClass(); Word.Document wordDoc = null; object format = Word.WdSaveFormat.wdFormatDocument; try { wordDoc = wordApp.Documents.Open(ref srcFileName, ref format, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); //图片 Word.Shape oShape = wordDoc.Shapes.AddPicture("D:\\DL_01.gif", ref Nothing, ref objt, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); oShape.WrapFormat.Type = Word.WdWrapType.wdWrapSquare; //将htm文件save as成doc文件 wordDoc.SaveAs(ref dstFileName, ref format, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); } finally { wordDoc.Close(ref Nothing, ref Nothing, ref Nothing); wordApp.Quit(ref Nothing, ref Nothing, ref Nothing); } }
C#向word文档动态插入数据并打印预览
首先机子上安装有office,在COM中添加引用Microsoft.Word.11.0.Object.Library(或11.0以上) Microsoft.Office.Interop.Word.Application myWordApp = null; Microsoft.Office.Interop.Word.Document doc = null; object Filename = path + "\\" + TaskID + ".docx";//目的文件 object templateFile = System.Windows.Forms.Application.StartupPath + @"\Template.docx";//模板文件,有一个五列一行的表 System.IO.File.Copy(templateFile.ToString(), Filename.ToString(), true);//模板WORD中有一个五列的表头,分别是卡号,串口号,发送指令条数,接收指令条数,收发成功率 myWordApp = new Microsoft.Office.Interop.Word.Application(); doc = myWordApp.Documents.Open(ref Filename, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); /////显示页码 object oAlignment = Microsoft.Office.Interop.Word.WdPageNumberAlignment.wdAlignPageNumberCenter; object oFirstPage = true; oAlignment = Microsoft.Office.Interop.Word.WdPageNumberAlignment.wdAlignPageNumberCenter; myWordApp.Selection.Sections[1].Footers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].PageNumbers.Add(ref oAlignment, ref oFirstPage); myWordApp.Selection.Sections[1].Footers[Microsoft.Office.Interop.Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].PageNumbers.NumberStyle = Microsoft.Office.Interop.Word.WdPageNumberStyle.wdPageNumberStyleNumberInDash; for (int i = 2; i < 102; i++)//举例100台 { doc.Tables[1].Rows.Add(ref Nothing);//表格增加一行 doc.Tables[1].Cell(i, 1).Range.Text = "250297";//卡号 doc.Tables[1].Cell(i, 2).Range.Text = "COM12";//串口号 doc.Tables[1].Cell(i, 3).Range.Text = "100";//发送指令条数 doc.Tables[1].Cell(i, 4).Range.Text = "99";//接收指令条数 doc.Tables[1].Cell(i, 5).Range.Text = "99%";//收发成功率 } doc.SaveAs(ref Filename, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); object savechanges = Microsoft.Office.Interop.Word.WdSaveOptions.wdDoNotSaveChanges;//不保存挂起的更改 ////下面是直接打印,文档不显示 //doc.PrintOut(ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing); object readOnly=false; object isVisable = true;////文档打开状态为可视 doc = myWordApp.Documents.Open(ref Filename, ref Nothing, ref readOnly, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref isVisable, ref Nothing, ref Nothing, ref Nothing, ref Nothing); doc.PrintPreview();//打印预览
Postman-REST-Client_v0.8.1.crx 绿色版
Postman helps you be more efficient while working with APIs. Postman is a scratch-your-own-itch project. The need for it arose while one of the developers was creating an API for his project. After looking around for a number of tools, nothing felt just right. The primary features added initially were a history of sent requests and collections.
git commit提示nothing to commit, working tree clean
本次想在码云上提交过的项目,同时提交到github上。 git报 Your branch is up-to-date with ‘origin/master’ , nothing to commit, working tree clean 最后查找原因:我没有修改过文件,再次提交到码云的分支上,导致git判断我没有更改,从而不能commit。 解决办法: 办法一:可以分为两步上传:(比较麻烦) 1.先提交到github 2.将最新的代码复制一份到码云的文件夹,提交到码云 办法二:在一个仓库里面同时提交到多个
mysql share nothing_为什么说 MySQL Cluster 是 shared-nothing 架构的?如何理解 shared-nothing ?...
share nothing和share disk是两种常见的分布式数据库模型。share nothing架构下,每个结点都有自己的CPU、内存、存储。跨结点的数据访问通过结点之间的网络通讯来完成。share disk架构下,每个结点有自己的CPU和内存,但是共享同一个存储。也就是说,存储只有一份,放在单独的分布式文件系统上,由文件系统本身来保证其可用性,一般由高端的专门存储设备来完成。大多数分布式...
C语言
69,371
社区成员
243,080
社区内容
发帖
与我相关
我的任务
C语言
C语言相关问题讨论
复制链接
扫一扫
分享
社区描述
C语言相关问题讨论
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章