Annoying Exporting a list to Excel

SharePoint lists have the ability to export their contents to an Excel Workbook.

This is quite cute – it gives the users a way to get the data out into something they’re familiar with, can manipulate and can print. However, I was having an issue. Using a list based on a Custom List (above), one of my columns (Enquiry) wasn’t exported:

I wondered at first if this was because of it’s column type (Hyperlink), or because I’d created the column programmatically. Then, on a hunch really, I tried changing the column order. I added another column before it in the list view. I used the ID column, but any should work. When I exported the list – all the columns I wanted came through (but the ID column didn’t).

What I think is going on here is that if you used the same export on a document library then typically – though not always – the first column is an icon for the type of file it is. My suspicion is that some muppet, when writing the export to excel, realised that they’d have these icons, and decided to avoid them by excluding the first column. This is unfortunate for two reasons:

  • Not all lists have icons – witness my Custom List
  • Not all document libraries have the file icon as the first column.

For now the resolution would be to have another column as the first on your list.

Advertisements
Annoying Exporting a list to Excel

Clean up SharePoint's UI with jQuery

So, the case management system I’m working on has a ‘Mailbox’ library. Really, it’s just an email enabled document library, with the address set to the name of the case. Anyway, when emails are received into this list, we’d like to show the subject, sender, cc, to addresses, and so on. It turns out that email enabling a document library does in fact add columns for those properties (but they’re not automatically added to the default view).

mailbox-page-default

Neat! Until you start looking at the code itself – then it sucks… Continue reading “Clean up SharePoint's UI with jQuery”

Clean up SharePoint's UI with jQuery

List Definitions don't need their own forms…

List definitions don’t need their own forms – if you’re happy with the out of box ones. Mostly, if you use something like the solution generator to create your List definition, it will create a number of forms by default for you:

as-created-by-solution-generator

These are then deployed into your list:

when-deployed-as-seen-in-sharepoint-designer

However, you don’t actually need these in your definition, unless you’re providing your own custom forms! Continue reading “List Definitions don't need their own forms…”

List Definitions don't need their own forms…

Regular Expression Validated Column in SharePoint

What a great discovery – a Regular Expression Validated column on Codeplex. I’ve been talking about writing one of these for about 6 months – and Gael Duhamel has written one for me! Kudos!

I’ve not tried it yet, but I’m putting it to the top of my ‘things to try’ list. As my colleagues know I love regular expressions, and I rather feel this should be OOB.

Regular Expression Validated Column in SharePoint

What columns can I use in my Search Results?

In a previous post I described adding the FileExtension column to the XML you get back from a SharePoint search, so that you can use it in your results page. This raises the question – what columns are available for use in the Selected Columns setting on the Core Search Web Part?

Well, these columns are Managed Properties, and they’re configured on the Shared Service Provider (SSP)… Continue reading “What columns can I use in my Search Results?”

What columns can I use in my Search Results?

Self Referencing Lookup columns

Came across something I’d not considered – self referencing lookup columns! I was doing some testing, and this totally caught me out (and caused my Outlook plugin to crash and die).

Basically, this is a Lookup column where the List that it is looking up onto is the same as the list where the lookup column is in use. In our case we had a list called ‘Issues’, and the lookup was a multi-choice look-up called ‘Related Issues’. It would let a user select things from the Issues list. All in all, a perfectly sensible use of a multiple lookup, and one I’d not thought of!

However, this in itself wouldn’t cause my plug-in to suffer an error. The problem was with the data I was getting back from the Web Services I’m using. I use the List Webservice‘s GetListContentType method to get information about the Content Type, and I then read the information about the fields. Lookup fields normally come through with an attribute List ; this is the list that’s being looked up onto, and normally it is a GUID. However, for self-referencing lookup instead of a GUID, you get a string ‘Self’‘. Okay, I can’t argue that it’s wrong, but it’s a smidgen annoying that it is inconsistent. Couldn’t it just give me the GUID and let me figure out if that’s the same list? Or use another attribute to denote that it’s a self-reference?

I don’t get why this was built that way.

Self Referencing Lookup columns

List Items, Documents and Attached files

One of our customers is saving Outlook emails into SharePoint; I’ve written an Outlook plugin to do this. The emails themselves are being saved as .msg files within Document Libraries.

A Document Library containing .MSG files

However, they’d like a nice column with a little Paperclip icon if the Email has attachments. For normal Lists, there is a column like this (provided that the List allows attachments)… Continue reading “List Items, Documents and Attached files”

List Items, Documents and Attached files