ブック

記事
IT・テクノロジー

Get

アクティブ
XSCRIPTCONTEXT.getDocument()
import uno

ctx = uno.getComponentContext()
smgr = ctx.getServiceManager()
desktop = smgr.createInstanceWithContext("com.sun.star.frame.Desktop" , ctx)
ブック = desktop.CurrentComponent
シートから
シート.getDrawPage().Forms.Parent

 ブック名

ブック.Title

 パス

import uno
パス = uno.fileUrlToSystemPath(ブック.URL)
file:/// 形式
ブック.URL

チェック

型判定
if ブック.supportsService("com.sun.star.sheet.SpreadsheetDocument"):

データ型

com.sun.star.sheet.XSpreadsheetDocument

サービス数40万件のスキルマーケット、あなたにぴったりのサービスを探す ココナラコンテンツマーケット ノウハウ記事・テンプレート・デザイン素材はこちら