The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

create excel attachments

Robert Komorowsky
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!
January 24, 2021

Hello!

I want to upload an excel file (.xlsx) into a card as an attachment. However, if I open the card, I can only download an attachment with the type application/octet-stream. How can I upload the file so that a card user (not necessarily me) can see the contents of the excel file?

I wrote the following code:

import requests

key = "cf96243c3494a8473e5caccd2d0f906c"
token = "c1b7ca7996e4cf4f007c014b4acf7451613af6207bb5d98ce41be50a1aed5a27"

query = {
'key': key,
'token': token,
'file': '10228-PA.xlsx',
'name': '10228-PA.xlsx'

response = requests.request(
"POST",
url = "".join(("https://api.trello.com/1/cards/", 'NU6mdURG', "/attachments")),
params=query
)

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Vero Rivas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 24, 2021
Robert Komorowsky
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!
January 24, 2021

Any info on how to upload excel files as attachments via python code?

TAGS
AUG Leaders

Atlassian Community Events