F
Fan13tom
Set xlApp = createObject("Excel.Application") 'создаем объект Excel
Set xlWB = xlApp.Workbooks.Add 'создаем новую книгу
Set xlSheet = xlWB.Sheets(1) ' выбираем первую "страницу"
'xlApp.visible = True ' делаем объект видимым
xlSheet.name = "Заключение"
Set db = session.CurrentDatabase
Set doc = ws.CurrentDocument.Document
xlSheet.Cells(1,1)="ФИО:"
xlSheet.Cells(2,1)=doc.LastName(0)+" "+doc.FirstName(0)+" "+doc.MiddleName(0)
xlSheet.Cells(3,1)="ИНН:"
xlSheet.Cells(4,1)=doc.inn(0)
xlSheet.Cells(5,1)="Заключение сотрудника безопасности"
xlSheet.Cells(6,1)=doc.db_res(0)
' xlWB("C:\Книга1").save
'(FileName, FileFormat, Password, WriteResPassword, ReadOnlyRecommended, CreateBackup, AccessMode, ConflictResolution, AddToMru, TextCodepage, TextVisualLayout, Local)
xlWB.SaveAs("C:\\dd.xls",xlTextWindows,"","",0,0,Excel."","","","","","")
' xlWB.saveas Filename:="C:\qqqq.xls", FileFormat:="xlTextWindows"
' With xlWB.saveas ("C:\вам\qqqq.xls","xlTextWindows")
' Filename="C:\вам\qqqq.xls"
' FileFormat="xlTextWindows"
' End With
xlApp.Quit
Set xlWB = xlApp.Workbooks.Add 'создаем новую книгу
Set xlSheet = xlWB.Sheets(1) ' выбираем первую "страницу"
'xlApp.visible = True ' делаем объект видимым
xlSheet.name = "Заключение"
Set db = session.CurrentDatabase
Set doc = ws.CurrentDocument.Document
xlSheet.Cells(1,1)="ФИО:"
xlSheet.Cells(2,1)=doc.LastName(0)+" "+doc.FirstName(0)+" "+doc.MiddleName(0)
xlSheet.Cells(3,1)="ИНН:"
xlSheet.Cells(4,1)=doc.inn(0)
xlSheet.Cells(5,1)="Заключение сотрудника безопасности"
xlSheet.Cells(6,1)=doc.db_res(0)
' xlWB("C:\Книга1").save
'(FileName, FileFormat, Password, WriteResPassword, ReadOnlyRecommended, CreateBackup, AccessMode, ConflictResolution, AddToMru, TextCodepage, TextVisualLayout, Local)
xlWB.SaveAs("C:\\dd.xls",xlTextWindows,"","",0,0,Excel."","","","","","")
' xlWB.saveas Filename:="C:\qqqq.xls", FileFormat:="xlTextWindows"
' With xlWB.saveas ("C:\вам\qqqq.xls","xlTextWindows")
' Filename="C:\вам\qqqq.xls"
' FileFormat="xlTextWindows"
' End With
xlApp.Quit