大神们怎么把这段LotusScript改成JavaScript?

靓仔多金有良心 2019-01-04 09:12:05
Option Public Sub Initialize Dim session As New NotesSession '建立新的執行程序 Dim db As NotesDatabase Set db = session.CurrentDatabase '抓本DB Dim view As NotesView Dim OGview As NotesView Dim OGLIST As Variant Dim doc As NotesDocument Dim itemA As NotesItem,itemB As NotesItem Dim nn As Integer '取得匯出的View Set view = db.GetView("month1") Set ogview = db.GetView("ByOG") '確定有文件匯出 則建立 Excel物件 Dim ws As New NotesUIWorkspace Set ws = New NotesUIWorkspace Dim selected As Variant Dim FileName As String Dim RESP As String Dim temresp As String tRESP=InputBox("請輸入欲匯出是年月時間,請注意輸入格式如:201006") If tresp="" Then MessageBox "未輸入匯出年月時間,匯出停止.", , _ "Message status" Exit Sub End If temog=InputBox("請輸入欲匯出資料的利潤中心(請使用大寫字母),為空則輸出資料庫中無利潤中心的資料,請注意輸入格式如:AG") resp=tresp+temog selected = ws.SAVEfiledialog(False," 請選擇要存檔位置及檔名檔案", "Microsoft Excel|*.xls", "") If IsEmpty(selected) Then MessageBox "您沒有選擇要存檔位置及檔名", 16, "訊息" Exit Sub End If FileName=selected(0) Dim xlApp As Variant, xlsheet As Variant, rows As Integer, cols As Integer Set xlApp = CreateObject("Excel.Application") xlApp.StatusBar = "Creating WorkSheet. Please be patient..." xlApp.Visible = True xlApp.Workbooks.Add xlApp.ReferenceStyle = 2 Set xlsheet = xlApp.Workbooks(1).Worksheets(1) rows=1 '從Excel第一列開始列資料 ,column headings starts in row 1 '先塞入 title xlsheet.Cells(rows,1).Value = "價格變更單號" xlsheet.Cells(rows,2).Value = "結案日期" xlsheet.Cells(rows,3).Value = "變更類型" xlsheet.Cells(rows,4).Value = "項次" xlsheet.Cells(rows,5).Value = "料號" xlsheet.Cells(rows,6).Value = "品名描述" xlsheet.Cells(rows,7).Value = "使用幾種(成品料" xlsheet.Cells(rows,8).Value = "現單價" xlsheet.Cells(rows,9).Value = "新單價" xlsheet.Cells(rows,10).Value = "PPV(差價)" xlsheet.Cells(rows,11).Value = "差價變更率" xlsheet.Cells(rows,12).Value = "ORACLE調幅" xlsheet.Cells(rows,13).Value = "變更原因" xlsheet.Cells(rows,14).Value = "廠商SITE" xlsheet.Cells(rows,15).Value = "廠商全名" xlsheet.Cells(rows,16).Value = "客人指定" rows=rows+1 Dim dc As NotesDocumentCollection Set d
...全文
96 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
十八道胡同 2019-01-04
  • 打赏
  • 举报
回复
JS版 没人回复你吗?
叶遮沉阳 2019-01-04
  • 打赏
  • 举报
回复
引用 1 楼 LCL_data 的回复:
JS版 没人回复你吗?
这段时间有兴趣看看论坛,发现你挺活跃
  • 打赏
  • 举报
回复
引用 1 楼 LCL_data 的回复:
JS版 没人回复你吗?
都没有 好荒凉

62,635

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧