Hello op2352,
Using excel can be a bit of a pain to be fair. Not knowing where in excel is going to make it even harder.
You need to activate the developer tab and enter your code via VBA (visual basic for applications).
It is not however as simple as adding the request as seen in the examples.
Below is for excel....it is a very simple piece of code to get quotes details for multiple quotes where you have an existing list of quotes
Code: Select all
Sub GetDetail()
Application.ScreenUpdating = False
Dim httpObject As Object
Set httpObject = CreateObject("MSXML2.XMLHTTP")
Dim QT
Dim CMP
Dim RW
Dim valueOne As String
Dim positionofSubstring As Integer
Dim JSON As Object, i As Integer
RW = 2
Do Until ActiveSheet.Cells(RW, 2).Value = ""
QT = ActiveSheet.Cells(RW, 2).Value
CMP = ActiveSheet.Cells(RW, 5).Value
sURL = "https://xxxxxx.simprosuite.com/api/v1.0/companies/" & CMP & "/quotes/" & QT
sRequest = sURL
httpObject.Open "GET", sRequest, False
httpObject.setRequestHeader "Authorization", "Bearer **********goes here*****************"
httpObject.setRequestHeader "Content-Type", "application/json"
httpObject.Send
sgetresult = httpObject.responseText
Set JSON = ParseJson(sgetresult)
i = 2
'For Each Item In JSON
Sheets(1).Cells(RW, 6).Value = JSON("Customer")("CompanyName")
Sheets(1).Cells(RW, 7).Value = JSON("Site")("Name")
Sheets(1).Cells(RW, 8).Value = JSON("Salesperson")("Name")
Sheets(1).Cells(RW, 9).Value = JSON("DueDate")
Sheets(1).Cells(RW, 10).Value = JSON("ProjectManager")("Name")
Sheets(1).Cells(RW, 11).Value = JSON("Total")("ExTax")
Sheets(1).Cells(RW, 12).Value = JSON("Totals")("GrossProfitLoss")("Estimate")
Sheets(1).Cells(RW, 13).Value = JSON("Totals")("NettMargin")("Estimate")
Sheets(1).Cells(RW, 14).Value = JSON("Totals")("ResourcesCost")("LaborHours")("Estimate")
Sheets(1).Cells(RW, 15).Value = JSON("Status")("Name")
'i = i + 1
'Next
RW = RW + 1
Loop
Set sgetresult = Nothing
Set httpObject = Nothing
Application.ScreenUpdating = True
End Sub
I would 100% recommend trying to get what you need from the current reporting suite or BI reporting.
You may find you have someone on staff with excel VBA experience or better yet Python.