Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to keep the macro and update only the confluence table in python??

조현성
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 15, 2021

Code.

from atlassian import Confluence

conf_site = "My Site"
conf_user = "My name"
conf_pass = "My pass"
page_title = "test"
page_space = "test"
page_id = 1234

conf = Confluence(url=conf_site,username=conf_user, password=conf_pass)

page = conf.get_page_by_id(page_id,expand='body.storage')
page_content = page['body']['storage']['value']

#Create DataFrame
table <- DataFrame

newHTML = table.to_html(index=False)

page_content = newHTML

conf.update_page(page_id,page_title, page_content)

This code works fine. 

However, the macro surrounding the table disappears after execution.

What should I do? 

Plz... Help me..

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 18, 2021

Hello @조현성,

Good evening, and welcome to Atlassian Community. Thank you for submitting your question.

It appears you're writing a macro or add-on for Confluence, and you need to update a table using Python. Can you help us to understand what you're trying to do? Please also confirm which version of Confluence you're writing for.

You may also want to ask the Atlassian Developer Community, which focuses more on answering development questions.

Take care, and I hope to hear from you soon!

Shannon | Atlassian Community Support

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events