大神们怎么把这段LotusScript改成JavaScript?
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