Tip: Excel + SharePoint content type template

Last year I was developing content types for one of my customers and I couldn’t find a way to bind the columns of the SharePoint item with the template in Excel (Word is easy…)

This weekend I found an article that gave me the clue that I needed:

http://stackoverflow.com/questions/1124294/display-custom-document-property-value-in-excel-2007-worksheet-cell

Basically, you have to create the content type, associate a macro enabled excel file as template and then include in a visual basic module this formula:

Public Function DocumentProperty(Property As String)

Application.Volatile

On Error GoTo NoDocumentPropertyDefined

 

DocumentProperty = ActiveWorkbook.ContentTypeProperties(Property).Value

Exit Function

NoDocumentPropertyDefined:

DocumentProperty = CVErr(xlErrValue)

End Function

In the excel sheet now you can call the SharePoint column properties writing in a cell “=DocumentProperty(“Name-of-the-sharepoint-column”)”

Hope it helps somebody!

Anuncios

Acerca de ricardodiazjimenez

I'm a person of big ambitions, but takes care of small details. As an entrepreneur I have learned to value people that surrounds me and invest in their wealth. Living in a big chaotic city has been an inspiration for ideas to make working from home a viable option. From some years, until now, I have discovered that sharing my knowledge is a way to feel good and at the same time, receive more. I have invested in a headhunting company specialized in information technology, an elearning content production company and an outsourcing administrative services company.
Esta entrada fue publicada en Sin categoría. Guarda el enlace permanente.

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s