Newsgroup: it.comp.appl.notes-domino
Titolo: Export in Excel

Qualcuno ha una funzione per esportare una vista in un foglio di excel?
Con la versione 4.5 di notes.
Ciao
Thanx
Copper

versione 4.5 di notes.
questa sub ,  dato un doc, ti crea il foglio excel, basta poco per adattarla
per pigliare i documenti dalla vista.
Sub CreaExcel(curdoc As notesdocument,allegato As String)
 Dim xlApp As Variant
 Dim xlBook As Variant
 Dim xlSheet As Variant
 Dim xlRange As Variant
 Set xlApp = CreateObject("Excel.Application") ' Crea un'istanza di Excel
 xlApp.Visible = False
 Set xlBook = xlApp.Workbooks.Add ' Crea file (WorkBook)
 Set xlSheet = xlBook.Worksheets(1) ' Prende il foglio sul quale vogliamo
lavorare (Primo foglio)
 xlsheet.Range("C2")="SAI INVESTIMENTI "
 xlsheet.Range("F2")="Tel  011/6657111"
 xlsheet.Range("I2")="Dati al "
 xlsheet.Range("J2")=Cstr(curdoc.FOF_InvDataAl(0))
 xlsheet.Range("C5")="Sai America: "
 xlsheet.Range("G5")=curdoc.FOF_America(0)
 xlsheet.Range("C6")="Sai Paesi Emergenti: "
 xlsheet.Range("G6")=curdoc.FOF_PaesiEmergenti(0)
 xlsheet.Range("C7")="Sai Europa: "
 xlsheet.Range("G7")=curdoc.FOF_Europa(0)
 xlsheet.Range("C8")="Sai Globale: "
 xlsheet.Range("G8")=curdoc.FOF_Globale(0)
 xlsheet.Range("C9")="Sai Italia: "
 xlsheet.Range("G9")=curdoc.FOF_Italia(0)
 xlsheet.Range("C10")="Sai Pacifico: "
 xlsheet.Range("G10")=curdoc.FOF_Pacifico(0)
 xlsheet.Range("C11")="Sai Bilanciato: "
 xlsheet.Range("G11")=curdoc.FOF_Bilanciato(0)
 xlsheet.Range("C12")="Sai Investilibero: "
 xlsheet.Range("G12")=curdoc.FOF_Investilibero(0)
 xlsheet.Range("C13")="Sai Liquidità: "
 xlsheet.Range("G13")=curdoc.FOF_Liquidita(0)
 xlsheet.Range("C14")="Sai Euromonetario: "
 xlsheet.Range("G14")=curdoc.FOF_Euromonetario(0)
 xlsheet.Range("C15")="Sai Obbligazionario Internazionale: "
 xlsheet.Range("G15")=curdoc.FOF_ObInternaz(0)
 xlsheet.Range("C16")="Sai Euro Obbligazionario: "
 xlsheet.Range("G16")=curdoc.FOF_EuroObbligaz(0)
 xlsheet.Range("C20")="SAI GESTIONI"
 xlsheet.Range("F20")="Tel   02/762741"
 xlsheet.Range("I20")="Dati al "
 xlsheet.Range("J20")=curdoc.FOF_GestDataAl(0)
 xlsheet.Range("F23")="Linea SaiGestifond"
 xlsheet.Range("G24")="Fondi/Sicav Az."
 xlsheet.Range("I24")="Fondi/Sicav Obbl."
 xlsheet.Range("C25")="SaiGestifondo Reddito : "
 xlsheet.Range("G25")=curdoc.FOF_FRedditoAz(0)
 xlsheet.Range("I25")=curdoc.FOF_FRedditoOb(0)
 xlsheet.Range("C26")="SaiGestifondo Bilanciata: "
 xlsheet.Range("G26")=curdoc.FOF_FBilanciataAz(0)
 xlsheet.Range("I26")=curdoc.FOF_FBilanciataOb(0)
 xlsheet.Range("C27")="SaiGestifondo Azionaria: "
 xlsheet.Range("G27")=curdoc.FOF_FAzionAz(0)
 xlsheet.Range("I27")=curdoc.FOF_FAzionOb(0)
 xlsheet.Range("C28")="SaiGestifondo Az. Paesi Emergenti: "
 xlsheet.Range("G28")=curdoc.FOF_FAzionPaesiAz(0)
 xlsheet.Range("I28")=curdoc.FOF_FAzionPaesiOb(0)
 xlsheet.Range("C29")="SaiGestifondo Bilanciata Captive: "
 xlsheet.Range("G29")=curdoc.FOF_FBilCaptiveAz(0)
 xlsheet.Range("I29")=curdoc.FOF_FBilCaptiveOb(0)
 xlsheet.Range("C30")="SaiGestifondo Azionaria Captive: "
 xlsheet.Range("G30")=curdoc.FOF_FAzionCaptiveAz(0)
 xlsheet.Range("I30")=curdoc.FOF_FAzionCaptiveOb(0)
 xlsheet.Range("F32")="Linea Sai Gest"
 xlsheet.Range("F33")="azionario"
 xlsheet.Range("G33")="obbligazionario"
 xlsheet.Range("I33")="Fondi/Sicav Az."
 xlsheet.Range("K33")="Fondi/Sicav Obbl."
 xlsheet.Range("C34")="SaiGestireddito: "
 xlsheet.Range("F34")=curdoc.FOF_RedditoAz(0)
 xlsheet.Range("G34")=curdoc.FOF_RedditoOb(0)
 xlsheet.Range("I34")=curdoc.FOF_RedditoSicAz(0)
 xlsheet.Range("K34")=curdoc.FOF_RedditoSicOb(0)
 xlsheet.Range("C35")="SaiGestipatrimonio Prudente: "
 xlsheet.Range("F35")=curdoc.FOF_PrudenteAz(0)
 xlsheet.Range("G35")=curdoc.FOF_PrudenteOb(0)
 xlsheet.Range("I35")=curdoc.FOF_PrudenteSicAz(0)
 xlsheet.Range("K35")=curdoc.FOF_PrudenteSicOb(0)
 xlsheet.Range("C36")="SaiGestipatrimonio Bilanciata: "
 xlsheet.Range("F36")=curdoc.FOF_BilanciataAz(0)
 xlsheet.Range("G36")=curdoc.FOF_BilanciataOb(0)
 xlsheet.Range("I36")=curdoc.FOF_BilanciataSicAz(0)
 xlsheet.Range("K36")=curdoc.FOF_BilanciataSicOb(0)
 xlsheet.Range("C37")="SaiGestipatrimonio Azionaria: "
 xlsheet.Range("F37")=curdoc.FOF_AzionariaAz(0)
 xlsheet.Range("G37")=curdoc.FOF_AzionariaOb(0)
 xlsheet.Range("I37")=curdoc.FOF_AzionariaSicAz(0)
 xlsheet.Range("K37")=curdoc.FOF_AzionariaSicOb(0)
 xlsheet.Range("C41")="SAI SICAV"
 xlsheet.Range("F41")="Tel   800/808090"
 xlsheet.Range("I41")="Dati al "
 xlsheet.Range("J41")=curdoc.FOF_SicavDataAl(0)
 xlsheet.Range("C43")="FormulaSAI Europa. Linea di protezione al 31.12.00
pari a 9.65 Euro: "
 xlsheet.Range("J43")=curdoc.FOF_EuropaSicav(0)
 xlsheet.Range("C47")="FONDI ASSICURATIVI"
 xlsheet.Range("F47")="Tel   011/6657111"
 xlsheet.Range("I47")="Dati al "
 xlsheet.Range("J47")=curdoc.FOF_AssDataAl(0)
 xlsheet.Range("C50")="Sai Quota: "
 xlsheet.Range("E50")=curdoc.FOF_Quota(0)
 xlsheet.Range("C51")="Sai Alfa2000: "
 xlsheet.Range("E51")=curdoc.FOF_Alfa(0)
 xlsheet.Range("C52")="Sai Beta2000: "
 xlsheet.Range("E52")=curdoc.FOF_Beta(0)
 xlsheet.Range("C53")="Sai Omega2000: "
 xlsheet.Range("E53")=curdoc.FOF_Omega(0)
 xlsheet.Range("C57")="FONDO PENSIONE APERTO SAI "
 xlsheet.Range("G57")="Tel   011/6657111"
 xlsheet.Range("I57")="Dati al "
 xlsheet.Range("J57")=curdoc.FOF_PensDataAl(0)
 xlsheet.Range("C60")="Linea Previ - Bond: "
 xlsheet.Range("E60")=curdoc.FOF_Bond(0)
 xlsheet.Range("C61")="Linea Previ - Gest: "
 xlsheet.Range("E61")=curdoc.FOF_Gest(0)
 xlsheet.Range("C62")="Linea Previ - Mix: "
 xlsheet.Range("E62")=curdoc.FOF_Mix(0)
 'Formattazione: carattere grassetto per i titoli
 XlApp.Range("C2:J2").Select
 XlApp.Selection.Font.Bold = True
 XlApp.Range("C20:J20").Select
 XlApp.Selection.Font.Bold = True
 XlApp.Range("F23").Select
 XlApp.Selection.Font.Bold = True
 XlApp.Range("G24:I24").Select
 XlApp.Selection.Font.Bold = True
 XlApp.Range("F32").Select
 XlApp.Selection.Font.Bold = True
 XlApp.Range("F33:K33").Select
 XlApp.Selection.Font.Bold = True
 XlApp.Range("C41:J41").Select
 XlApp.Selection.Font.Bold = True
 XlApp.Range("C47:J47").Select
 XlApp.Selection.Font.Bold = True
 XlApp.Range("C57:J57").Select
 XlApp.Selection.Font.Bold = True
 xlapp.activeworkbook.saveas allegato
 xlapp.activeworkbook.close
 xlapp.quit
 Set xlapp = Nothing
End Sub
-- 
Posted from [213.255.46.171] 
via Mailgate.ORG Server - 
http://www.Mailgate.ORG