1

Here is a code snippet:

' Send the query in the body to Jira, and get the response from Jira

strJsonResponse = Utilities.JiraRequest(strJQLQuery)

I'd like to put this json into a Python parser and then return the parsed json back into the spreadsheet. Is this possible? I've never worked with VBA before.

I have downloaded the JIRA API module and the openpyxl module.

2
  • 2
    If you want to parse it with Python, why do you bother VBA? Commented May 26, 2017 at 19:48
  • Please show how VBA is relevant here. Is Jira only available as VBA reference? Commented May 27, 2017 at 19:15

2 Answers 2

1

You might be able to create a new text file and output VBA to that

Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Dim Fileout As Object
Set Fileout = fso.CreateTextFile("C:\your_path\vba.txt", True, True)
Fileout.Write strJsonResponse
Fileout.Close

VBA code found here

then have VBA start up your python script where you can have python parse your file. There is probably a better way to do this but I'm not sure what.

Sign up to request clarification or add additional context in comments.

Comments

0

I think that Tehscript raised a valid question. Are you certain that there's a need to use VBA code in addition to your Python code? By running Python code that makes use of the openpyxl module you can read out and modify basically everything that's in an Excel file, completely without the need to run an Excel application.

Sometimes there are valid reasons for coupling VBA and Python code. The most common one is when you want to use Excel as a familiar graphical user interface to direct data manipulation operations, but want Python to do the actual heavy-lifting. If you're looking to do this, then there's the xlwings module. Xlwings makes it easy to call Python code from inside VBA modules, and to exchange data values between VBA and Python.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.