用户登录
用户注册

分享至

建立helloword.xls

  • 作者: 南宫玉儿__
  • 来源: 51数据库
  • 2020-04-15

VB 如何调用EXCEL VBA带参过程

Set xlsApp = Nothing /*----------有参调用模式-------------*/ xls文件中代码如下: Sub test2(str As String) MsgBox (str) End Sub VB代码如下: Dim xlsApp As Excel.Application Dim xlsBook As Excel.Workbook Dim xlsSheet As Excel.Worksheet Set xlsApp = New Excel.Application Set xlsBook = xlsApp.Workbooks.Open(App.Path + "\test.xls") Set xlsSheet = xlsBook.Worksheets(1) xlsApp.Visible = False Call xlsApp.Run("test2", "Hello!World!")

Java如何使用Java向PDF页面中添加文本

①建立com.lowagie.text.Document对象的实例。

Document document = new Document(); ②建立一个书写器(Writer)与document对象关联,通过书写器(Writer)可以将文档写入到磁盘中。

PDFWriter.getInstance(document, new FileOutputStream("Helloworld.PDF")); ③打开文档。

document.open(); ④向文档中添加内容。

document.add(new Paragraph("Hello World")); ⑤关闭文档。

document.close(); 通过上面的5个步骤,就能产生一个Helloworld.PDF的文件,文件内容为"Hello World"。

转载请注明出处51数据库 » 建立helloword.xls

软件
前端设计
程序设计
Java相关