my firm is transferring a project to another firm. The new firm wants a list of all of our files. I went into our sharepoint library and selected "Export to Excel" which returned a spreadsheet with the file path, link to the file, file size, date created, and last modified by. I need that to also indicate Version number.

Is this possible, either OOTB, or programmatically?

2 Answers 2


Add the version column to the current view and selected "Export to Excel".=) Or of course you can do that programmatically using SPFile.UIVersionLabel for example:

using (SPSite site = new SPSite("Your site url"))
    using (SPWeb web = site.OpenWeb())
        SPList docs = web.Lists["Your library name"];
        foreach (SPFile file in docs.RootFolder.Files)
            var fileVersion = file.UIVersionLabel;
  • the version column is already in the current view. I will try making a custom view and see if that works. As well as forward this to our developer.
    – Vidro3
    Dec 19, 2013 at 15:32

The version number does not display when using Export to Excel.

You have several options:

  • Use a calculated column with value =Version. This formula will work despite the column not being available. [Not recommended due to caching and freezing during export].
  • Write a VBA function within your connected spreadsheet which will import the version info after the initial import. [Also not recommended because each user would be required to save a local version of the file for every required list.]
  • Write a PowerShell script which prompts for Web URL and List name, and specify some default columns. Users could run this locally, or you could make list specific and automate it with a scheduled task which can email required users. [Recommended but still has its pitfalls.]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.