![見出し画像](https://assets.st-note.com/production/uploads/images/85974332/rectangle_large_type_2_fcb232c288c2428e346e5026365810f2.png?width=1200)
LibraOffice Calcで複数のファイルを1枚にまとめる〜マクロの記録まで〜
LibraOfficeCalcの複数のファイルを1枚にまとめるやり方です。
EXCELと異なりクエリ等は使えないので、以下のやり方が順当です。
![](https://assets.st-note.com/img/1662039658380-6pPjRDbhUs.png?width=1200)
![](https://assets.st-note.com/img/1662039738270-IU6Wxs379L.png?width=1200)
![](https://assets.st-note.com/img/1662040128608-dQItg1OyZV.png)
![](https://assets.st-note.com/img/1662039795207-GeO7RqhHcj.png?width=1200)
![](https://assets.st-note.com/img/1662040078358-jk17LBFGFP.png?width=1200)
今の操作を記録をマクロで記録してみましょう
![](https://assets.st-note.com/img/1662040897862-AVZdrqsAbo.png?width=1200)
![](https://assets.st-note.com/img/1662040939398-BbCmv1yVOL.png?width=1200)
![](https://assets.st-note.com/img/1662041000752-AKsrNS8RXv.png)
![](https://assets.st-note.com/img/1662041137358-X1miyxLvBT.png?width=1200)
![](https://assets.st-note.com/img/1662041361032-N2WfX9hjpJ.png?width=1200)
マクロではBASIC言語で、以下のように記録されていました。
sub sheetcopy
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:InsertSheetFromFile", "", 0, Array())
end sub
この記事が気に入ったらサポートをしてみませんか?