Macro/Basic/Calc/Dati

    From The Document Foundation Wiki
    This page is a translated version of the page Macros/Basic/Calc/Data and the translation is 100% complete.
    Other languages:

    Return to Index

    Dati

    In this topic, many examples using current selection, caution, you sure the current select object is correct.

    Read

    Read like string for one cell (ScCellObj)

    selection = ThisComponent.getCurrentSelection()
    MsgBox selection.getString()

    Read like value for one cell (ScCellObj)

    selection = ThisComponent.getCurrentSelection()
    MsgBox selection.getValue()

    Write

    Write string for one cell (ScCellObj)

    selection = ThisComponent.getCurrentSelection()
    selection.String = "Ingrid Bergman"

    Write value for one cell (ScCellObj)

    selection = ThisComponent.getCurrentSelection()
    selection.Value = 100

    Delete

    Data series

    Search and replace

    Notes