Das Notes Forum
Domino 9 und frühere Versionen => Entwicklung => Thema gestartet von: seerow am 29.11.04 - 15:51:34
-
Hallo zusammen,
ich möchte in einen Export2Excel script gerne noch die folgende Funktion einbauen.
Nach der Formatierung des Excel sheets soll in die Zelle A1 ein Wert geschrieben werden (siehe Pfeile).
Leider beendet das script den Import mit der Fehlermeldung "Error 182 occured whilst formatting the spreadsheet, execution aborted"
.
.
.
.
currentprocess = "creating an Excel spreadsheet"
Set handle = CreateObject("Excel.Application")
handle.visible = True
handle.Workbooks.Open(filename)
Set wsheet = handle.Application.Workbooks(1).Worksheets(1)
'format spreadsheet
currentprocess = "formatting the spreadsheet"
wsheet.Name = viewname
wsheet.Cells.Font.Size = 8
wsheet.Rows("1:1").Select
wsheet.Rows("1:1").Font.Bold = False
wsheet.Cells.EntireColumn.Autofit
'return to cell A1 for tidyness
wsheet.Range("A1").Select
-----> 'wsheet.Selection.EntireRow.Insert
-----> wsheet.ActiveCell.FormulaR1C1 = "asset_db ## this is an working asset importsheet"
.
.
.
.
-
Hi,
warum machst du es denn nicht so?
wSheet.Range("A1").Value = "Wert"
Axel
-
hm ::) Stimmt, jetzt geht es.....danke
Aber wie bekomme ich noch eine zeile Über zelle A1 eingefügt??
wsheet.Selection.EntireRow.Insert funktioniert leider nicht
-
Hi,
versuch's mal mit der Insert-Methode des Range-Objectes. Angaben zu den Parametern findest du in der Excel-VBA - Hilfe.
Axel
-
so gehts...... ;D
'format spreadsheet
currentprocess = "formatting the spreadsheet"
wsheet.Name = viewname
wsheet.Cells.Font.Size = 8
wsheet.Rows("1:1").Select
wsheet.Rows("1:1").Font.Bold = False
wsheet.Cells.EntireColumn.Autofit
'return to cell A1 for tidyness
---->wsheet.Range("A1").Select
---->wsheet. Rows("1:1").Insert
---->wSheet.Range("A1").Value = "Wert"