excelFunction

  グローバル



  
Dim ExcelApp

Const xlContinuous = 1
Const xlDash = -4115
Const xlDashDot = 4
Const xlDashDotDot = 5
Const xlDot = -4118
Const xlDouble = -4119
Const xlSlantDashDot = 13
Const xlLineStyleNone = -4142

Const xlHairline = 1
Const xlMedium = -4138
Const xlThick = 4
Const xlThin = 2

Const xlInsideHorizontal = 12
Const xlInsideVertical = 11
Const xlDiagonalDown = 5
Const xlDiagonalUp = 6
Const xlEdgeBottom = 9
Const xlEdgeLeft = 7
Const xlEdgeRight = 10
Const xlEdgeTop = 8

Const xlAutomatic = -4105

Const xlMaximized = -4137
Const xlMinimized = -4140
Const xlNormal = -4143

Const xlGeneral = 1
Const xlLeft = -4131
Const xlCenter = -4108
Const xlRight = -4152
Const xlFill = 5
Const xlJustify = -4130
Const xlCenterAcrossSelection = 7
Const xlDistributed = -4117
Const xlTop = -4160
Const xlBottom = -4107
  



  ExcelInit



  
REM ******************************************************
REM オブジェクト作成
REM ******************************************************
Function ExcelInit()

	If Not IsObject(ExcelApp) Then
		Set ExcelApp = CreateObject("Excel.Application")
	End If

End Function
  


サンプル
  
<JOB>
<SCRIPT
	language="VBScript"
	src="http://homepage2.nifty.com/lightbox/laylaClass.vbs">
</SCRIPT>
<SCRIPT language=VBScript>
' ***********************************************************
' 処理開始
' ***********************************************************
Call laylaFunctionTarget( "http://homepage2.nifty.com/lightbox/" )
Call laylaLoadFunction( "baseFunction.vbs" )
Call laylaLoadFunction( "excelFunction.vbs" )

' 関数処理
ExcelInit
ExcelVisible( True )

' 単独処理
ExcelApp.Workbooks.Add
Set MyBook = ExcelApp.Workbooks(1)

' 関数処理
Call ExcelSetCell(MyBook, "Sheet1", 1, 1, "8月" & chrw(13310))

' 単独処理
ExcelApp.Quit

Set ExcelApp = Nothing

</SCRIPT>
</JOB>
  



  重要な単独処理

  
' 警告メッセージを出さない
ExcelApp.DisplayAlerts = False

' 保存せずにブック追加
ExcelApp.Workbooks.Add

' ブック、シートの番号取得
Set MyBook = ExcelApp.Workbooks(1)
Set MySheet = MyBook.Worksheets(1)
  










  infoboard   管理者用   
このエントリーをはてなブックマークに追加





フリーフォントWEBサービス
SQLの窓WEBサービス

SQLの窓フリーソフト

素材

一般WEBツールリンク

SQLの窓

フリーソフト

JSライブラリ