+ Start a Discussion

Manipulate Salesforce Through Excel

My company has a Professional account, English-language Salesforce.

I am currently trying to build an Excel app that can query my company's Salesforce account and make edits to certain fields. (Right now, what I'm trying to do is set up a system to collect tracking numbers for our outbound packages, and upload that data into Salesforce, all automatically. Once I have that built, I will be doing other projects along similar lines.)

I have the Excel Connector for Professional Edition. However, I need to be able to call the sfQuery and sfUpdate functions from my own macros. So far, I have not been able to work out how to do this. When I try the following:

Call sfQuery

...in my own project, I get "Sub or Function Not Defined." Is there something else I need to do in order to make this happen?
Mike Schinkel.ax196Mike Schinkel.ax196
I would also like to know how to do this.
Ron HessRon Hess
launch Excel, then the MS Visual Basic environment ( alt F11), then launch the object browser ( F2)

now you can click on the sforce_connector project, then in the pull down select sforce_connect and you can see what functions are public and therefore should be callable.

I only use the sflookup , sfaccount, sfusername() functions and only have the EE version installed.

so i tried to build a workbook macro as you describe
i get the same message, this is because the VB environment still does not know how to call into that function

so, I build the macro try()

sub try()
call sfUpdate()
end sub

this fails with the message you saw

so I go into "Tools" --> References
then add a checkbox for sforce_connector,
click OK

then it works.

Mike Schinkel.ax196Mike Schinkel.ax196
Ron: Is it possible to do with with Professional Edition?
Ron HessRon Hess
i think so, unless he public functions were hidden, they should still be usable.

just put "=sfemail('some@email.com')" into a cell in your worksheet and save, you should be prompted for a login.

this is documented in the help file, under the help menu, look for "Callable Functions"