Excel VBA - How to download a file attachement from Confluence using REST APIs

Deleted user February 26, 2018

PROBLEM STATEMENT:
I am unable to open file attachments via a URL using VBA. Instead of getting the file, I am asked to log in.

DETAILS:

  • This was working a couple of months ago.
  • The URL's (which I got by using REST API) look like this:

http://wiki.intra.mycompany.com/download/attachments/232030890/J_Smith_Staffing.pdf

  • If I click on the URL, a web browser opens and the typical download process begins, starting with, "What do you want to do with this file?". I click 'SAVE', and it saves. No additional logins required, and I get the workbook I asked for.

  • When executed via VBA, instead of getting my Excel file, I get an Excel file with one worksheet.  The worksheet i just a garbled log in screen for Confluence.

  • The line of VBA code is: 
    Set source_report = Workbooks.Open(cell.Value)

I suspect that this has to do with two factor authentication, which my company has been using more and more. Like I said, this used to work.

The files I am trying to download are coming from our Confluence Wiki, sever. I am logged in to Confluence Server. I checked.



Help, please?
Arty

2 answers

0 votes
Mike Lang
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!
March 1, 2018

SOLVED! 

 

Excel VBA seems to be using Internet Explorer to execute URL's.  I was logged into the Wiki on Edge, but not logged in on IE. 

 

Once I logged in on IE, things started working again. 

 

Back to work!

Mike

0 votes
Mike Lang
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!
February 28, 2018

bump

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events