GithubHelp home page GithubHelp logo

Comments (4)

timhall avatar timhall commented on August 28, 2024

Hi @fortm You should be able to use your own implementation of Dictionary (as long as it implements Scripting.Dictionary's interface). The error you're receiving is from the Excel-REST classes having an instancing = PublicNotCreatable, so your Dictionary implementation needs to be set to the same (instead of instancing = Private).

Any particular reason you're replacing the Microsoft Scripting runtime? I had thought about doing something similar for Mac support, but without ServerXMLHTTP it didn't seem feasible just yet.

from vba-web.

fortm avatar fortm commented on August 28, 2024

I am doing a POC right now using Excel-REST and being cautious , in case enabling Scripting might not happen on client Excel since rest of software is not dependent on that. So far, I had good success with Excel-REST and thanks to you

I will try your change and then post how it went

from vba-web.

fortm avatar fortm commented on August 28, 2024

Instancing part worked right but it failed at this line in RestRequest.FormattedResource() , directly going to RestClient ErrorHandling block

For Each segment In Me.UrlSegments.Keys
Err Number : 92
Err.description : "For loop not initialized"

I see that in implemented Dictionary , Keys() method is implemented as below , so when count is 0, then this might be leading to uninitialized error.

Public Property Get Keys() As String()
Dim vlist() As String, i As Long
If Me.Count > 0 Then
ReDim vlist(0 To Me.Count - 1)
For i = LBound(vlist) To UBound(vlist)
vlist(i) = KeyValuePairs.Item(1 + i).Key '
Next i
Keys = vlist
End If
End Property

from vba-web.

timhall avatar timhall commented on August 28, 2024

Hi @fortm, I've released VBA-Dictionary which is a drop-in replacement for adding Dictionary support without Scripting.Dictionary. Just add Dictionary.cls to your project and you can remove the dependency on Microsoft Scripting Runtime.

from vba-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.