How to make webservice call from excel securely.

I want to make a webservice call with some secure method from excel.

How can I prevent the for some one to hacked the excel macro code and copy the webservice url.

How can  incrypt the URL post to webservice and the result back from webservice to excel on client side.
Bharat GuruAsked:
Who is Participating?
zorvek (Kevin Jones)ConsultantCommented:
The short answer is that Excel VBA code cannot be securely protected without the use of third party tools. There are two basic approaches.

The first approach is to extract the sensitive code into compiled external library files using any compilable language such as VB6, or C##. The advantage is that the sensitive code is converted to a compiled form and is much harder to view or reverse engineer. The disadvantage is that another development environment with suitable compiler is required. The estimated cost of a development environment such as Visual Studio is between $500 and $700. Another disadvantage is that an additional file is required to run the Excel workbook.

The second approach is to purchase a third party tool ( that compiles the Excel workbook into a stand-alone application. The advantage is the compiled workbook will run without the Excel application. According to the Excel compiler author the compiled application runs much faster. The disadvantage is that the cost of the workbook compiler is $3,000.

What is gained by protecting IP? Is it worth it? Most don't think so. Before pursuing one of the above paths consider what motivates people. Most people really don't care what's under the hood. Most of the few who do just want to see how the workbook was built - nothing malicious - just curiosity. The very few who would do something bad are going to do it no matter what is done to the workbook to protect the contents and that's what lawyers are for.

Bharat GuruAuthor Commented:
I like the first idea using application to make the webservice connection call and return the result for excel spreadsheet.

And from excel If I can call the application or component to grab the data and display in excel spreadsheet.

Is there any way I can update the excel spreadsheet automatically from application?

Is there any sample code for similar approach. In what format I should return the data from application which translate to excel.

zorvek (Kevin Jones)ConsultantCommented:
I'm sorry. I do not know how to do this. I was hoping someone in the other zones would respond.

I suggest closing this question and asking a new question in the zone.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.