Create a directory XML from Excel

Occasional Visitor

Create a directory XML from Excel

After doing some searching it seems that others have had the same requirement but I couldn't find a macro that anybody has shared.  So I wrote one that is very simple to use.


Attached is a ZIP file that contains a MS Excel file (.XLSM).  This allows one to enter the names and contact information as supported in SIP 3.1.8 (and others).  The file is unlocked so you can view the source code and modify it as you may wish.


When you click the 'Generate File' button on the sheet it will create an xxxxxxxxxxxx-directory.xml file in the same folder that the Excel file was opened from. 


I have tested the output file with Polycom IP501 SIP 3.1.8 phones that I have been working at provisioning.  It likely will work with other versions and most Polycom IP phones that can process the phone specific contact directory XML files.  This does NOT include the <lb></lb> label property but you can add that if you wish to modify the macro code.


Again, the source code is open so you can modify this as you see fit for your needs.


Nathan Smith


Polycom Employee & Community Manager

Re: Create a directory XML from Excel

Hello Nathan,

welcome to the Polycom Community.

Thanks for sharing this and kudos to you !


In addition a Perl script can be found => here <= as well that uses a CSV file as a source.

Please ensure to provide some feedback if this reply has helped you so other users can profit from your experience.

Best Regards

Steffen Baier

Polycom Global Services


If official support is required please check how to phone or open a case here

The title Poly Employee & Community Manager is a community setting and does not reflect my role. I am just a simple volunteer in the community like everybody else. All posts and words are my own & do not represent the views of Employer.


⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓SIGNATURE ⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓⇓
Notice: This community forum is not an official Poly support resource, thus responses from Poly employees, partners, and customers alike are best-effort in attempts to share learned knowledge.
Please also ensure you always check the VoIP , Video Endpoint , Microsoft Voice , PSTN or other FAQ's in the different sections
Message 2 of 4
Occasional Visitor

Re: Create a directory XML from Excel

Thanks for the Perl script link. 


I noticed that the version I posted does not include the last name entry in the XML output. By adding an addition row with a word such as 'end' in the last name field this will fix this problem.  The bug is with the calculation of the number of rows / names that are occupied.






Message 3 of 4

Re: Create a directory XML from Excel

Hi, Nathan,

Thank you so much for putting the file together. I worked with my dad (who knows VB/macros), and the new version will now generate multiple files. Just list the MACs in the right column, click Generate, and it'll work!


I do note there's something about the logic that requires there be at least two contacts or the macro won't run properly.. Not sure if I've ever seen a case where we'd be doing all this work for a single contact! 


Hope this helps!