Domino 9 und frühere Versionen > ND6: Entwicklung
Excel Datei nicht speichern
Diana82:
Hallo,
habe da ein Problem. Ist wahrscheinlich ganz einfach, aber kann nichts finden.
Also ich exportiere von einer Maske Zahlen in eine bestimmte Excel-Datei, dort wird dann was gerechnet und anschließend importiere ich dann wieder Zahlen. Am Ende möchte ich das Excel-Dokument schließen und nicht speichern.
Das ganze soll dann unsichtbar im Hintergrund laufen.
Also mein Problem ist jetzt wie ich NICHT speichere beim schließen. ??? Kann mir da jemand helfen?
Danke
Gruß
Diana
Glombi:
Ich nehme an, dass Du mit den COM Klassen arbeitest?
Falls ja, dann sieh mal hier:
http://www.excel-vba.com/vba-workbooks.htm
If you want to close the active workbook without saving it:
ActiveWorkbook.Saved = True
ActiveWorkbook.Close
und hier die Doku aus MSDN
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_wrcore/html/wrgrfexcelworkbookobject.asp
Andreas
Diana82:
ähm...keine Ahnung. Mache das ganze mit LotusScript.
Glombi:
Poste mal den Code.
Diana82:
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim xlApp As Variant
Dim xlsheet As Variant
Dim rows As Integer
Dim cols As Integer
Dim roi As String
Dim kap As String
Set uidoc = ws.CurrentDocument
Set xlApp = CreateObject("Excel.Application")
xlApp.Workbooks.Open "J:\DCF.xls"
xlApp.Visible = True
Set xlsheet = xlApp.Workbooks(1).Worksheets(1)
rows=12 'Nutzungsdauer
cols = 4
nutz=uidoc.FieldGetText( "k_re_j_52" )
xlsheet.Cells(rows,cols).Value = nutz
(...)
roi = xlsheet.cells( 24 ,4 ).value 'ROI aus Excel
Call uidoc.FieldSetText( "k_roi", roi )
kap = xlsheet.cells( 225 ,16 ).value 'Kapitalrückfluss aus Excel
Call uidoc.FieldSetText("k_kap_rück", kap)
xlApp.Workbooks.close
End Sub
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln