Contact


Advertisement


If you have any questions, any topic you want to be covered, suggestions, bugs or anything you don’t like on DebugPoint.com – drop a note at contact [at] debugpoint.com. We shall reply.

Thanks for visiting DebugPoint.com.

 

  • JvonRuhl
  • JvonRuhl

    I just tried to send a note in the comments, and it didn’t like it so I’ll try here, I tried to install i-nex on my Linux Mint 18 and it didn’t work. Here’s a screenshot of my terminal:

    /home/jud/Pictures/Screenshot from 2016-12-02 07-18-50.png
    Got any ideas? Thanks!

    • I can’t see your screenshot. Upload it here by clicking the small icon at the bottom of the text box while you are replying here.

  • Christian Martel

    LO Calc Macro: How to program a response to a prompt when using a standard function

    Although this question is so basic, I have not been able to find any online help, blog or tutorial to clear up this issue.

    I’ve imported a table from a web site. The process I followed to import it into LO Calc produced too many columns: 6 in place of two. I wish to merge columns #2 through #6 into one column, and left justify the content.

    I easily record a macro “x” using the menu function. When I use the merge button from the tool bar, after selecting the cells, the merge function prompts to know if it should keep the contents of all the other columns and place them in the first cell. Possible responses are “Yes”, “No” or “Cancel”. During the Macro recording I reply with an “Alt-y” and it works during the recording. The macro is then associated with a key board short-cut. When I call, it stops on the prompt and the recorded response does not seem to work. I can manually respond with the keyboard and the macro completes ok. But the programmed response was one of the purposes of the macro. Please note that I’m working in French and the programming should be in English, but just in case . . .

    Thanks for any help. Here’s the code :

    sub x
    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 ———————————————————————-
    dim args3(0) as new com.sun.star.beans.PropertyValue
    args3(0).Name = “By”
    args3(0).Value = 1

    dispatcher.executeDispatch(document, “.uno:GoRightSel”, “”, 0, args3())

    rem ———————————————————————-
    dim args4(0) as new com.sun.star.beans.PropertyValue
    args4(0).Name = “By”
    args4(0).Value = 1

    dispatcher.executeDispatch(document, “.uno:GoRightSel”, “”, 0, args4())

    rem ———————————————————————-
    dim args5(0) as new com.sun.star.beans.PropertyValue
    args5(0).Name = “By”
    args5(0).Value = 1

    dispatcher.executeDispatch(document, “.uno:GoRightSel”, “”, 0, args5())

    rem ———————————————————————-
    dim args6(0) as new com.sun.star.beans.PropertyValue
    args6(0).Name = “By”
    args6(0).Value = 1

    dispatcher.executeDispatch(document, “.uno:GoRightSel”, “”, 0, args6())

    rem ———————————————————————-
    dim args7(0) as new com.sun.star.beans.PropertyValue
    args7(0).Name = “By”
    args7(0).Value = 1

    dispatcher.executeDispatch(document, “.uno:GoRightSel”, “”, 0, args7())

    rem ———————————————————————-
    dim args8(0) as new com.sun.star.beans.PropertyValue
    args8(0).Name = “MoveContents”
    args8(0).Value = true

    dispatcher.executeDispatch(document, “.uno:ToggleMergeCells”, “”, 0, args8())

    rem ———————————————————————-
    dim args9(0) as new com.sun.star.beans.PropertyValue
    args9(0).Name = “HorizontalAlignment”
    args9(0).Value = com.sun.star.table.CellHoriJustify.LEFT

    dispatcher.executeDispatch(document, “.uno:HorizontalAlignment”, “”, 0, args9())

    rem ———————————————————————-
    dim args10(1) as new com.sun.star.beans.PropertyValue
    args10(0).Name = “By”
    args10(0).Value = 1
    args10(1).Name = “Sel”
    args10(1).Value = false

    dispatcher.executeDispatch(document, “.uno:GoDown”, “”, 0, args10())

    rem ———————————————————————-

    end sub

    Best Regards,

    Christian

    • Its not possible to bypass the prompt “Should the contents of the hidden cells be moved into the first cell” when you are recording a macro. If you really want all the values from other cells to come to one single cell, use the =CONCATENATE function. Or you can use “&” operator as well.

      e.g.
      A1 = “Hello”
      B1 = “World”

      In target cell C1, you can put this formula =A1&B1

Translate »