How to import data from lotus to excel data sheet through lotus script
Subject: import data
tmpsheet = GetObject(‘’,‘excel.sheet’)XLApp = tmpsheet.application
XLApp.Visible = .t.
XLApp.WorkBooks.close()
rfile=“newfile.XLS”
xlDiagonalUp = 6
xlEdgeLeft = 7
xlEdgeTop =8
xlEdgeBottom=9
xlEdgeRight = 10
xlInsideVertical = 11
xlInsideHorizontal = 12
xlThick=4
xlContinuous=1
xlMedium = -4138
xlAutomatic = -4105
xlsum=-4157
xlDown=-4121
xlCenter = -4108
xlLeft = -4131
XLApp.WorkBooks.open(rfile)
xlsheet=XLApp.Sheets(1)
r_col=1
xlsheet.Cells(1,r_col).value="CLS"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="LEVI'S CODE"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="DCCO PARENT CODE"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="DCCO CLIENT CODE"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="SALES REP"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="BILLING NAME"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="BILLING ADDRESS"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="ZIP"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="CITY"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="SHIPPING NAME"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="SHIPPING ADDRESS"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="ZIP"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="CITY"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="TOT. DEST"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
xlsheet.Cells(1,r_col).WrapText = .t.
r_col=r_col+1
xlsheet.Cells(1,r_col).value="CURR."
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="POT."
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="DCCO TRGT (000)"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value=mstgout1+" SHOES"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value=mstgout1+" BELTS"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value=mstgout1+" ACC."
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="TTL "+mstgout1
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="SHARE "+mstgout1
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="TTL BUDGT "+mstgout2
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).interior.ColorIndex = 6
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="% BUDGT/TRGT"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).interior.ColorIndex = 6
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value=mstgout2+" SHOES"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value=mstgout2+" BELTS"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value=mstgout2+" ACC."
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="TTL "+mstgout2
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).interior.ColorIndex = 6
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
r_col=r_col+1
xlsheet.Cells(1,r_col).value="% ABV BLW"
xlsheet.Cells(1,r_col).font.colorindex=rcolortit
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).LineStyle = xlContinuous
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).Weight = xlMedium
xlsheet.Cells(1,r_col).Borders(xlEdgeBottom).ColorIndex = xlAutomatic
xlsheet.Rows("1:1").Font.FontStyle="Bold"
xlsheet.Cells.Select
xlsheet.Cells.EntireColumn.AutoFit
oSel = XLApp.Selection
oSel.Font.Name = "Arial"
oSel.Font.Size = 11
xlsheet.Cells(1,1).Select
xlsheet.Columns("A:A").ColumnWidth = 5
xlsheet.Columns("B:B").ColumnWidth = 8
xlsheet.Columns("B:B").WrapText = .t.
xlsheet.Columns("C:C").ColumnWidth = 10
xlsheet.Columns("C:C").WrapText = .t.
xlsheet.Columns("D:D").ColumnWidth = 8
xlsheet.Columns("D:D").WrapText = .t.
xlsheet.Columns("D:D").Borders(xlEdgeRight).LineStyle = xlContinuous
xlsheet.Columns("D:D").Borders(xlEdgeRight).Weight = xlThick
xlsheet.Columns("E:E").ColumnWidth = 30.00
xlsheet.Columns("E:E").WrapText = .t.
xlsheet.Columns("F:F").ColumnWidth = 30.00
xlsheet.Columns("F:F").WrapText = .t.
xlsheet.Columns("G:G").ColumnWidth = 30.00
xlsheet.Columns("G:G").WrapText = .t.
xlsheet.Columns("H:H").ColumnWidth = 7
xlsheet.Columns("H:H").WrapText = .t.
xlsheet.Columns("J:J").Borders(xlEdgeRight).LineStyle = xlContinuous
xlsheet.Columns("J:J").Borders(xlEdgeRight).Weight = xlThick
xlsheet.Columns("Q:Q").Borders(xlEdgeRight).LineStyle = xlContinuous
xlsheet.Columns("Q:Q").Borders(xlEdgeRight).Weight = xlThick
xlsheet.Columns("V:V").Borders(xlEdgeRight).LineStyle = xlContinuous
xlsheet.Columns("V:V").Borders(xlEdgeRight).Weight = xlThick
xlsheet.Columns("X:X").Borders(xlEdgeRight).LineStyle = xlContinuous
xlsheet.Columns("X:X").Borders(xlEdgeRight).Weight = xlThick
xlsheet.Columns("K:M").ColumnWidth = 0
xlsheet.Columns("K:M").WrapText = .t.
xlsheet.Columns("N:N").ColumnWidth = 6
xlsheet.Columns("Q:AC").ColumnWidth = 8
xlsheet.Columns("Q:AC").WrapText = .t.
xlsheet.Columns("Q:AB").NumberFormat = "0.0;[Red]0.0"
xlsheet.Columns("V:V").NumberFormat = "0.0%"
xlsheet.Columns("X:X").NumberFormat = "0.0%"
xlsheet.Columns("AC:AC").NumberFormat = "0.0%"
mrange="A1:AZ10"
XLApp.Range(mrange).Select
oSelected = XLApp.Selection
oSelected.RowHeight = 60
xlsheet.PageSetup.PrintTitleColumns = ""
xlsheet.PageSetup.PrintArea=""
xlsheet.PageSetup.LeftFooter = ""
xlsheet.PageSetup.CenterFooter = ""
xlsheet.PageSetup.RightFooter = ""
xlsheet.PageSetup.LeftHeader = ""
xlsheet.PageSetup.RightHeader = "&16Pagina &P" && Progressivo pagina
xlsheet.PageSetup.CenterHeader = ""
xlsheet.PageSetup.Draft = .f.
xlsheet.PageSetup.PrintHeadings = .f.
xlsheet.PageSetup.PrintGridlines = .t.
xlsheet.PageSetup.BlackAndWhite = .t.
xlsheet.PageSetup.CenterHorizontally = .f.
xlsheet.PageSetup.CenterVertically = .f.
xlsheet.PageSetup.Orientation = 2
xlsheet.PageSetup.Zoom = .f.
xlsheet.PageSetup.FitToPagesWide = 1
xlsheet.PageSetup.FitToPagesTall = 999
xlsheet.PageSetup.LeftMargin = xlsheet.PageSetup.Application.InchesToPoints(0.4)
xlsheet.PageSetup.RightMargin = xlsheet.PageSetup.Application.InchesToPoints(0.4)
xlsheet.PageSetup.TopMargin = xlsheet.PageSetup.Application.InchesToPoints(0.8)
xlsheet.PageSetup.BottomMargin = xlsheet.PageSetup.Application.InchesToPoints(0.4)
xlsheet.Rows("1:1").Insert(xlDown)
xlsheet.Rows("1:1").Insert(xlDown)
xlsheet.Rows("1:1").Insert(xlDown)
xlsheet.Rows("1:1").Insert(xlDown)
xlsheet.Cells(1,5).value = "DCCO DISTRIBUTION REPORT "+dtoc(date())+" ("+r_tipodesc+")"
xlsheet.Cells(1,5).WrapText = .f.
xlsheet.Cells(1,5).Font.FontStyle="Bold"
xlsheet.Cells(1,5).Font.size=16
xlsheet.Cells(1,5).Font.ColorIndex = 49
xlsheet.Cells(2,1).value = "Agent: "+substr(rfile2,at("_",rfile2)+1)
xlsheet.Cells(3,1).value = "Seasons: "+substr(rfile2,1,at("_",rfile2)-1) && "&F" && Nome FILE
xlsheet.Cells(2,1).WrapText = .f.
xlsheet.Cells(2,1).Font.FontStyle="Bold"
xlsheet.Cells(2,1).Font.size=12
xlsheet.Cells(3,1).WrapText = .f.
xlsheet.Cells(3,1).Font.FontStyle="Bold"
xlsheet.Cells(3,1).Font.size=12
xlsheet.Cells(4,3).value = "DCCO"
xlsheet.Cells(4,3).Font.FontStyle="Bold"
xlsheet.Cells(4,3).Font.size=12
xlsheet.Cells(4,6).value = "CUSTOMER INFORMATIONS"
xlsheet.Cells(4,6).WrapText = .f.
xlsheet.Cells(4,6).Font.FontStyle="Bold"
xlsheet.Cells(4,6).Font.size=12
xlsheet.Rows("4:5").select
oSelected = XLApp.Selection
oSelected.HorizontalAlignment = xlCenter
oSelected.Borders(xlEdgeLeft).LineStyle = xlContinuous
oSelected.Borders(xlEdgeLeft).Weight = xlMedium
oSelected.Borders(xlEdgeTop).LineStyle = xlContinuous
oSelected.Borders(xlEdgeTop).Weight = xlMedium
oSelected.Borders(xlEdgeBottom).LineStyle = xlContinuous
oSelected.Borders(xlEdgeBottom).Weight = xlMedium
oSelected.Borders(xlEdgeRight).LineStyle = xlContinuous
oSelected.Borders(xlEdgeRight).Weight = xlMedium
oSelected.Borders(xlInsideHorizontal).LineStyle = xlContinuous
oSelected.Borders(xlInsideHorizontal).Weight = xlMedium
xlsheet.Cells(4,20).value = "SEASON "+mstgout1
xlsheet.Cells(4,20).WrapText = .f.
xlsheet.Cells(4,20).Font.FontStyle="Bold"
xlsheet.Cells(4,20).Font.size=12
xlsheet.Cells(4,23).value = "B U D G E T"
xlsheet.Cells(4,23).WrapText = .f.
xlsheet.Cells(4,23).Font.FontStyle="Bold"
xlsheet.Cells(4,23).HorizontalAlignment = xlLeft
xlsheet.Cells(4,23).Font.size=12
xlsheet.Cells(4,26).value = "SEASON "+mstgout2
xlsheet.Cells(4,26).WrapText = .f.
xlsheet.Cells(4,26).Font.FontStyle="Bold"
xlsheet.Cells(4,26).Font.size=12
xlsheet.PageSetup.PrintTitleRows = "$1:$5"
xlsheet.Cells(1,1).Select
XLApp.activeworkbook.save
XLApp.activeworkbook.close
XLApp.quit
Subject: import data
refer this code
http://searchdomino.techtarget.com/tip/1,289483,sid4_gci489103,00.html
Subject: import data
u can import the data using this lotus script code.
Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc,doc1 As NotesDocument
Dim view As NotesUIView
Dim view1 As notesview
Dim j As Integer
Dim xlApp,r1 As Variant
Dim m,m1,m2,m3,m4 ,m5 As Integer
Set db = session.CurrentDatabase
'Set view = db.GetView( "Employee Detail" )
Set view = workspace.CurrentView
Set view1 = db.GetView( view.viewname )
Set collection = db.UnprocessedDocuments
m=view1.ColumnCount
m1=1
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
xlApp.workbooks.add
Forall c In view1.Columns
xlApp.ActiveSheet.Cells(3,m1).Value =c.Title
m1=m1+1
End Forall
row=2
m2=5
m5=1
For m3 = 1 To collection.Count
Set doc = collection.GetNthDocument( m3 )
xlApp.ActiveSheet.Cells(m5,1).Value ="The follow up as on"
xlApp.ActiveSheet.Cells(m5,3).Value =Today()
xlApp.ActiveSheet.Cells(m2,3).Value =doc.LetterSrlNo(0)
xlApp.ActiveSheet.Cells(m2,3).Value =doc.Letter_sub(0)
xlApp.ActiveSheet.Cells(m2,3).Value =doc.rem1(0)
xlApp.ActiveSheet.Cells(m2,4).Value =doc.rem2(0)
'r1=Evaluate("@Name([CN];'"+doc.Letter_recipient(0)+"')",doc)
'xlApp.ActiveSheet.Cells(m2,3).Value =r1(0)
xlApp.ActiveSheet.Cells(m2,3).Value =doc.rem1(0)
'xlApp.ActiveSheet.Cells(m2,4).Value =doc.Letter_sub(0)
'xlApp.ActiveSheet.Cells(m2,4).columnwidth=60
'xlApp.ActiveSheet.Cells(m2,5).Value =doc.Letter_rcvd_date(0)
'xlApp.ActiveSheet.Cells(m2,6).Value =doc.Lettter_Status(0)
m2=m2+1
Next
xlApp.ActiveSheet.name=view.viewname
Set xlApp=Nothing
Set doc=Nothing
regards,
Rekha