V
Vagor.ini
Gogan.exe
Если есть индекс у базы - обнови...
Еще помогает обновление индексов представления (Shift+F9)
Если есть индекс у базы - обнови...
Еще помогает обновление индексов представления (Shift+F9)
Познакомьтесь с пентестом веб-приложений на практике в нашем новом бесплатном курсе
Sub Click(Source As Button)
Dim WS As notesuiworkspace
Dim UiView As notesuiview
Dim ViewString As String
Dim session As NotesSession
Dim db As NotesDatabase
Dim v As NotesView
Dim docX As NotesDocument
Dim col As Integer
Dim row As Double
Dim xl As Variant
Dim xlWbk As Variant
Dim pagename As String
Set WS = New notesuiworkspace
Set session = New notessession
Set db=session.CurrentDatabase
' Динамически получаеим вид, работает в v5 и выше
Set UiView=WS.currentview
ViewString=UiView.viewname
Set v=db.GetView(ViewString)
' Create Excel Sheet
Set xl=CreateObject("Excel.Application")
Set xlWbk=xl.Workbooks.Add
' Первая строка с заголовком
col=1
Forall vColumn In v.Columns
xlWbk.ActiveSheet.Cells(1, col)=vColumn.Title
col=col+1
End Forall
' Строки с документами
row=2
Set docX=v.GetFirstDocument
While Not docX Is Nothing
col=1
Forall cValue In docX.ColumnValues
xlWbk.ActiveSheet.Cells(row, col)=cValue
col=col+1
End Forall
row=row+1
Set docX=v.GetNextDocument(docX)
Wend
' Заполнение ячеек
xlWbk.ActiveSheet.Columns.AutoFit
Print "Excel Document Successfully Created!"
' Открываем файл
xl.Visible=True
End Sub
'declarations
Dim Date1 As notesdatetime
Dim Date2 As notesdatetime
Set Date1 = New notesdatetime(doc.FirstDate(0))
Set Date2 =New notesdatetime(doc.SecondDate(0))
Differ# = Date2.TimeDifference(Date1)
If Differ# > 0 Then
Days% = Differ# / 86400
Days% = CycleTimeDate1,Date2,days%)
doc.CT1 = Days% 'where CT1 is a Field to capture the difference and
store it in a form
Else
doc.CT1 = 0
End If
In a Library create a function "Cycletime"
Function CycleTime(Date1 As notesdatetime, Date2 As notesdatetime,days As
Integer)
Dim hdoc As notesdocument
Dim view As notesview
Dim Y As Integer,x As Integer
Set ses = New notessession
Set Cdb = ses.currentdatabase
Set view = Cdb.getview("holiday")
x% = days%
Y% = 0
Do Until Y% = x%
Y% = Y%+ 1
Call Date1.AdjustDay(1)
Wday1$ = Cstr(Date1.LocalTime)
Set hdoc = view.getdocumentbykey(Wday1$ )
If Not hdoc Is Nothing Or Weekday(Date1.DateOnly)=1 Or
Weekday(Date1.DateOnly)= 7 Then
days% = days% - 1
CycleTime = days%
Else
CycleTime = days%
End If
Loop
End Function
Обучение наступательной кибербезопасности в игровой форме. Начать игру!