# About insertText on excel

**URL:** <https://forum.collaboraonline.com/t/about-inserttext-on-excel/2999>\
**Category:** User Support\
**Created:** [September 23, 2024, 6:26am UTC](https://forum.collaboraonline.com/t/about-inserttext-on-excel/2999 "2024-09-23T06:26:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![langziyang](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/langziyang/32/1347_2.png) [@langziyang](https://forum.collaboraonline.com/u/langziyang)\
**Post date:** [September 23, 2024, 6:26am UTC](https://forum.collaboraonline.com/t/about-inserttext-on-excel/2999/1 "2024-09-23T06:26:02Z")

</div>

hi,i use php and javascript.  
i already add custom button on my project.  
 ![image](https://europe1.discourse-cdn.com/flex013/uploads/collaboraonline/original/2X/9/931c3ae83e9507857d84302aadc883402de8ba9a.png)  
so,next i want insert some text when i click this button.so i try this code:

```auto
postMessage({
                            MessageId: 'Send_UNO_Command',
                            Values: {
                                Command: '.InsertText',
                                Args: {
                                    Text: {
                                        type: 'string',
                                        value: 'this is text',
                                    },
                                    ParaStyleName: {
                                        type: 'string',
                                        value: 'Heading 1'
                                    }
                                }
                            }
                        })

```

not working, the code is from forum search;

then i use google find this code:

```auto
postMessage({'MessageId': 'CallPythonScript',
                            'SendTime': Date.now(),
                            'ScriptFile': 'InsertText.py',
                            'Function': 'InsertText',
                            'Values': { 'text': {'type': 'string', 'value': 'test'}}
                        });

```

still not working.

then i find [online/browser/html/framed.doc.html at master · CollaboraOnline/online (github.com)](https://github.com/CollaboraOnline/online/blob/master/browser/html/framed.doc.html)  
i run the code on my server, the Run python InsertText.py script and Run Capitalize.py script not working,but the other function (Hide/Show Menubar and others) is working fine. please tell me where is my mistake. thanks

---

<div class="post-metadata">

**Author:** ![darshan](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/darshan/32/2230_2.png) [@darshan](https://forum.collaboraonline.com/u/darshan)\
**Post date:** [September 25, 2024, 6:11am UTC](https://forum.collaboraonline.com/t/about-inserttext-on-excel/2999/2 "2024-09-25T06:11:29Z")

</div>

Hello @langziyang I see you had some discussion in Matrix about this topic. Is this issue solved ? Did you get any conclusion ?

Thanks,  
Darshan

---

<div class="post-metadata">

**Author:** ![langziyang](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/langziyang/32/1347_2.png) [@langziyang](https://forum.collaboraonline.com/u/langziyang)\
**Post date:** [September 25, 2024, 6:31am UTC](https://forum.collaboraonline.com/t/about-inserttext-on-excel/2999/3 "2024-09-25T06:31:59Z")

</div>

still not solved.the api document is very simple
