LibreOffice 7.4 Bantuan
The SFDocuments shared library provides a number of methods and properties to facilitate the management and handling of LibreOffice documents.
The SFDocuments.Calc service is a subclass of the SFDocuments.Document service. All methods and properties defined for the Document service can also be accessed using a Calc service instance.
The Calc service is focused on:
Handling sheets within a Calc document (copy, insert, move, etc)
Exchanging data between Basic data structures and Calc ranges
Copying and importing massive amounts of data
This help page describes methods and properties that are applicable only to Calc documents.
Before using the Calc service the ScriptForge library needs to be loaded or imported:
The Calc service is closely related to the UI service of the ScriptForge library. Below are a few examples of how the Calc service can be invoked.
The code snippet below creates a Calc service instance that corresponds to the currently active Calc document.
Set oDoc = CreateScriptService("Calc")
Another way to create an instance of the Calc service is using the UI service. In the following example, a new Calc document is created and oDoc is a Calc service instance:
Dim ui As Object, oDoc As Object
Set ui = CreateScriptService("UI")
Set oDoc = ui.CreateDocument("Calc")
Or using the OpenDocument method from the UI service:
Set oDoc = ui.OpenDocument("C:\Documents\MyFile.ods")
It is also possible to instantiate the Calc service using the CreateScriptService method:
Dim oDoc As Object
Set oDoc = CreateScriptService("SFDocuments.Calc", "MyFile.ods")
In the example above, "MyFile.ods" is the name of an open document window. If this argument is not provided, the active window is considered.
It is recommended to free resources after use:
Set oDoc = oDoc.Dispose()
However, if the document was closed using the CloseDocument method, it becomes unnecessary to free resources using the command described above.
myDoc = CreateScriptService("Calc")
ui = CreateScriptService("UI")
myDoc = ui.CreateDocument("Calc")
myDoc = ui.OpenDocument(r"C:\Documents\MyFile.ods")
myDoc = CreateScriptService("SFDocuments.Calc", "MyFile.ods")
myDoc.Dispose()
The use of the prefix "SFDocuments." while calling the service is optional.
Many methods require a "Sheet" or a "Range" as argument. Single cells are considered a special case of a Range.
r atau skrip Python.
Many methods require a "
Closes the given form document. Returns True if closure is successful.
orientation: Either PORTRAIT or LANDSCAPE. When absent, amplorms(formdocument: str, form:="hd_le calling th special case of a
This page is: : Contoh:
Many methods.ǡtitle: String expression displayed in the title bar of the dialosi="htt(ss="litersdoʔcriptFoftemtype="http://schema.org/SoftwareSoua>
82733781987">CloseFormDocument
itemtype="http://schema.org/SoftwareS>
LBound
and upper UBound boundaries are identical to that of the first dimension of the input array.
Help content debug info:
1591891assreturn:r="auto">Exchanging data between Basic data structures aElement" ito">E)
/span>, s"><233" dir="auto">
-num"In_PD data-tooltip="Klik pada teks untuk menyalik ke papan klip">
bas.Xray(bas.StarDesktop)
Caluide/text_color= oDoc.@oDoubclass of the