Visible

構文
Application.Visible
引数
戻値

プログラム実行例

ExcelからWordを起動する

CONST xlMicrosoftWord = 1

DIM Excel = CREATEOLEOBJ("Excel.Application")
Excel.Visible = TRUE

// Wordを起動
Excel.Application.ActivateMicrosoftApp(xlMicrosoftWord)

DIM ID = GETID("Microsoft Word", "OpusApp")
SLEEP(5.000)

// Wordを閉じる
CTRLWIN(ID, CLOSE)
Excel.Quit
  1. CREATEOLEOBJ
  2. Excel.Application.Visible
  3. Excel.Application.ActivateMicrosoftApp
  4. GETID
  5. SLEEP
  6. CTRLWIN
  7. Excel.Application.Quit

アクティブセルに文字列を入力する

DIM Excel = CREATEOLEOBJ("Excel.Application")
Excel.Visible = TRUE
Excel.Workbooks.Add()

DIM Range = Excel.Application.ActiveCell
SLEEP(1.000)
Range.Value = "abc"
SLEEP(3.000)

Excel.Application.DisplayAlerts = FALSE
Excel.Quit
  1. CREATEOLEOBJ
  2. Excel.Application.Visible
  3. Excel.Workbooks.Add
  4. Excel.Application.ActiveCell
  5. SLEEP
  6. Excel.Range.Value
  7. Excel.Application.DisplayAlerts
  8. Excel.Application.Quit

アクティブシート名を取得する

DIM Excel = CREATEOLEOBJ("Excel.Application")
Excel.Visible = TRUE
Excel.Workbooks.Add()

DIM Worksheet = Excel.Application.ActiveSheet
PRINT Worksheet.Name

Excel.Application.DisplayAlerts = FALSE
Excel.Quit
  1. CREATEOLEOBJ
  2. Excel.Application.Visible
  3. Excel.Workbooks.Add
  4. Excel.Application.ActiveSheet
  5. Excel.Worksheet.Name
  6. Excel.Application.DisplayAlerts
  7. Excel.Application.Quit

アクティブプリンターの名前を取得

DIM Excel = CREATEOLEOBJ("Excel.Application")
Excel.Visible = TRUE

PRINT Excel.Application.ActivePrinter

Excel.Application.DisplayAlerts = FALSE
Excel.Quit
  1. CREATEOLEOBJ
  2. Excel.Application.Visible
  3. Excel.Application.ActivePrinter
  4. Excel.Application.DisplayAlerts
  5. Excel.Application.Quit
結果
Brother DCP-J963N Printer on Ne03:

スタートアップフォルダのパスを取得

DIM Excel = CREATEOLEOBJ("Excel.Application")
Excel.Visible = TRUE

PRINT Excel.Application.StartupPath

//Excel.Application.DisplayAlerts = FALSE
//Excel.Quit
  1. CREATEOLEOBJ
  2. Excel.Application.Visible
  3. Excel.Application.StartupPath
  4. Excel.Application.DisplayAlerts
  5. Excel.Application.Quit
結果
C:\Users\akita\AppData\Roaming\Microsoft\Excel\XLSTART