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
南宫玉儿__