Altering Author, Editor, etc. office 365 specific

I have seen examples out there where using CSOM you can do something like:
User usr = ctx.Web.SiteUsers.GetByEmail("[email protected]");
ctx.Load(usr);
ctx.ExecuteQuery();
Folder fldr = ctx.Web.GetFolderByServerRelativeUrl("/sitecollectionroot/subsite/Shared%20Documents/testfldr");
File file = fldr.Files.GetByUrl("testThumbnail.png");
List list = ctx.Web.Lists.GetByTitle("Documents");
ListItem item = file.ListItemAllFields;
ctx.Load(list);
ctx.Load(fldr);
ctx.Load(file);
ctx.Load(item);
ctx.ExecuteQuery();
FieldUserValue newUser = new FieldUserValue();
newUser.LookupId = usr.Id;
itemById["Editor"] = newUser;
itemById.Update();
ctx.ExecuteQuery();
I tried this and it screwed up the farm in that in any site collection I had, the modified by field retained the Author value no matter who it was that was changing the item or document. Microsoft premier support said that this was due to some problem
they were trying to patch--that it had to do with some checkin/checkout issue. I don't really understand why that would be, and if someone here that knows about this issue would like to chime in feel free.
Bottom line, that seems like a disaster. If I can issue a command like the above in CSOM and wipe out the ability for multiple site collections on my tenant to be able to retain proper capture of who was last editing a document there is a big problem.
Anyway, on to the real question. I want to know how I am really suppose to change these values. Obviously companies like AvePoint and ShareGate are retaining the versioning and author etc. info when moving stuff between site collections.
They are not using server side code or server side custom stuff they have built. So how are they doing this?
I have also seen examples of altering the list schema temporarily to set these above fields to readonly=false and then setting them back after all changes have been applied. IS this how third party vendors are doing this? It seemed that was a sorta work
around.
Third I had heard some word that Microsoft was working on a tool or api component to be able to do this effectively? Is there a timeline on this?
Thanks.

Hi,
Finally, I got the client object model to update editor and author field in Office 365 like the code demo below which worked:
static void Main(string[] args)
UpdateListItem();
public static void UpdateListItem()
var siteURL = "https://tenant.sharepoint.com/sites/ZhengyuGuo";
var listName = "Documents";
var listId = 1;
var createdBy = "Dennis Guo";
var modifiedBy = "Dennis Guo";
ClientContext context = new ClientContext(siteURL);
//Create SharePoint Online credentials
var login = "loginname";
var password = "your password";
var securePassword = new SecureString();
foreach (char c in password)
securePassword.AppendChar(c);
SharePointOnlineCredentials credentials = new SharePointOnlineCredentials(login, securePassword);
context.Credentials = credentials;
List list = context.Web.Lists.GetByTitle(listName);
ListItem item = list.GetItemById(listId);
FieldUserValue author = GetUsers(context, createdBy);
FieldUserValue editor = GetUsers(context, modifiedBy);
item["Author"] = author;
item["Editor"] = editor;
item.Update();
context.ExecuteQuery();
//get user by username
public static FieldUserValue GetUsers(ClientContext clientContext, string UserName)
FieldUserValue userValue = new FieldUserValue();
User newUser = clientContext.Web.EnsureUser(UserName);
clientContext.Load(newUser);
clientContext.ExecuteQuery();
userValue.LookupId = newUser.Id;
return userValue;
Thanks
Best Regards,
Jerry Guo
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected].

Similar Messages

  • Mac Mail can't resolve Office 365 address adding account

    I'm just putting this out there, I'm sure it will be addressed soon.
    Just loaded up a VM or Yosemite on my Macbook Pro so I can start testing it for our network environment.  First major glitch - Mac Mail will not resolve an Office 365 email address and allow you to add the account to Mac Mail.  This is huge considering many of our clients are hosted using Office 365 for their corporate email.  Mavericks never had issues with this, hoping its a quick fix without the need of a work around.  Ironically using Outlook for Mac 2011 works just fine, which is pretty strange to me considering it still has to resolve outlook.office365.com for the server names in autodiscovery.
    Lets go Apple....this OS looks great, don't make it your MSFT Vista!

    Mavericks Mail has had problems with Exchange. Many have been resolved but at this time, Outlook for Mac is a better Exchange client than Mail from reports that I have seen.
    I'm trying a trial of Rackspace Exchange Email wondering if its Office 365 specific.
    How are you pointing your MX & cname setting to two different services?
    You said another user was able to setup. Is there any difference in OSX and email client. Compare settings.
    What error are you getting.

  • Can we made office 365 team site as anonymous site (Public site)? If yes, please provide me the steps or some links.

    can we made office 365 team site as anonymous site (Public site)?
    If yes, please provide me the steps or some links.

    Hello Jahir,
    I'd suggest asking Office 365 specific questions on the
    SharePoint 2013 - Development and Programming  forum instead.

  • Cannot click in search mail and people field using Office 365

    As of this week, four of the users in our school have reported that they cannot click within the search mail field using Office 365. Happens on Macs running 10.8 and 10.9 when using Firefox version 28. When they try using Google Chrome they can use the email search function.
    Is anyone else having this issue? Any ideas? I updated to the latest versions of Flash and Java same result.
    Thank you!

    Hi CT_Dave, I do know that search api can have alot of dom elements on them and that scripts on a page can be prevented from running. However, for Office 365 specifically I do not know what kind of search they have.
    You can monitor the search page by looking in the web console to see if there are any specific errors that may be causing this issue.
    In the about:config, please also make sure javascript is enabled.
    # In the address bar, type "about:config" (with no quotes), and press Enter.
    # Click "I'll be careful, I promise"
    # In the search bar, search for "javascript.enabled" (with no quotes).
    # Right click the result named "javascript.enabled" and click "Toggle". JavaScript is now disabled.
    To Re-enable JavaScript, repeat these steps.

  • Any info on how to get iCloud calendar, contacts, etc to sync with office 365 on macbook pro?, any info on how to get iCloud calendar, contacts, etc to sync with office 365 on macbook pro?

    Any info on how to get icloud calendar, contacts, etc to sync with office 365 on macbook pro?

    You can't, there is no connection between the services, use one or the other.

  • Are all features available in Power BI for office 365 available in On-Premise Excel, SQL server etc

    Are all features available in Power BI for office 365 available in On-Premise Excel, SQL server etc
    Thanks
    Nate

    No. The tools used to create Power BI reports are available in the on premises versions:
    Power Query
    Power Pivot
    Power Map
    Power View
    To take advantage of these in a PowerBI site, or to use Q&A you need a subscription to Office365 with a PowerBI license.

  • Since 8.1 update to Surface, I can't access office 365 portal, nor yahoo, "This certificate cannot be verified up to a trusted certification authority"

    I have spent at least 10 hours doing every imaginable fix recommended, and none of them have the least bit of effect on this problem.  Unbelievably frustrating, "certificate errors" and can't get to the Office 365 portal, and can't set up
    Outlook.  MS didn't put an automatic restore point on my computer before doing the 8.1 upgrade, so I'm screwed there. Dead in the water, this Surface tablet is a doorstop at this point. Swear word.

    Looked at the system log (don't know how to attach it here, so text below, removed our network info, SIDs, etc), and it seems the problem is that the computer can't reach the domain controller, which means the clock isn't synched, so even though the
    "system time" on my desktop is right, it's screwing around with the certificates (I think). When I did the update to 8.1, I unjoined from the domain, (because my domain has a WSUS) then rejoined after the 8.1 update was done (it's my only Win8 computer).
    Please don't tell me to "add as a trusted site", etc., because after 15 hours of troubleshooting, believe me, I've done everything, including trying to uninstall IE11 (you can't in Windows 8.1, you can only "disable", then "re-enable",
    which does nothing).  Thanks.
    Level Date and Time Source Event ID Task Category
    Warning 2/21/2014 8:49:13 AM LsaSrv 40961 None The Security System could not establish a secured connection with the server No authentication protocol was available.
    Warning 2/21/2014 8:48:16 AM LsaSrv 40961 None The Security System could not establish a secured connection with the server
    l No authentication protocol was available.
    Warning 2/21/2014 8:47:50 AM Microsoft-Windows-DNS-Client 8019 (1028) "The description for Event ID 8019 from source Microsoft-Windows-DNS-Client cannot be found. Either the component that raises this event is not installed on
    your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    the message resource is present but the message is not found in the string/message table
    Information 2/21/2014 8:47:51 AM BROWSER 8033 None The browser has forced an election on network \Device\NetBT_Tcpip because a master browser was stopped.
    Warning 2/21/2014 8:47:38 AM LsaSrv 40961 None The Security System could not establish a secured connection with the server No authentication protocol was available.
    Warning 2/21/2014 8:47:35 AM Microsoft-Windows-DNS-Client 8019 (1028) "The description for Event ID 8019 from source Microsoft-Windows-DNS-Client cannot be found. Either the component that raises this event is not installed on
    your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    the message resource is present but the message is not found in the string/message table
    Information 2/21/2014 8:47:07 AM BTHUSB 18 None "The description for Event ID 18 from source BTHUSB cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted.
    You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    Information 2/21/2014 8:47:06 AM Microsoft-Windows-Power-Troubleshooter 1 None "The description for Event ID 1 from source Microsoft-Windows-Power-Troubleshooter cannot be found. Either the component that raises this event is not
    installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    2/20/2014 7:40:19 PM
    2/21/2014 1:47:04 PM
    6341
    1894
    1865
    0
    2783
    1549
    113134
    16897
    5
    5
    0
    0
    0
    0
    0
    the message resource is present but the message is not found in the string/message table
    Error 2/21/2014 8:47:05 AM Microsoft-Windows-NDIS 10317 PnP "The description for Event ID 10317 from source Microsoft-Windows-NDIS cannot be found. Either the component that raises this event is not installed on your local computer
    or the installation is corrupted. You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.
    The following information was included with the event:
    EV_RenderedValue_0.00
    4
    19984723346456576
    Marvell AVASTAR 350N Wireless Network Controller
    74
    the message resource is present but the message is not found in the string/message table
    Error 2/21/2014 8:47:05 AM BTHUSB 17 None "The description for Event ID 17 from source BTHUSB cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted.
    You can install or repair the component on the local computer.
    If the event originated on another computer, the display information had to be saved with the event.

  • How to get MOSI API values (like Customer GUID, Subscription GUID etc.,) from Office 365 PowerShell

    Hi MOSI Team,
    I need Customer GUID, Subscription GUID which were created by OrderManagement API (CreateCustomerAccount, PlaceOrder) with Office 365 PowerShell (either Exchange or MSOL) script.
    Is it possible?
    Thank you in advance.
    Regards,
    Sashi

    Reading that, it has not improved and its May 2014.
    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

  • Office 365 ability for a specific setup - advice please

    I have a client, that has 1 main company with 2 areas HM is the main company HC is the secondary company which is part of HM
    All of the staff work for HM and HC, and have roles within both... but to clients have a slightly different outward appearance
    I have managed to sell the idea of Office 365 to them as they are a small company (one company)
    They have 2 domains HM.com and HC.com all of the work towards the HM division go to HM and from HM, and all of the work to the HC area go to and from HC.
    This is where the difficulty sets in.
    I have sold the idea of a hosted exchange setup as they have used Exchange in the past and see the immense value... but as a small company and SBS no longer available Office 365 is clearly the way to go.
    They will definitely be going for a Office E3 plan at £15 a month per user for Office and Exchange (although I do wonder can we combine E3 and Business Premium as not all users require Access?)
    Now this will be to the main company of HM as that is the primary company.
    The second division of the company HC do need email too though. Now I know I can tie multiple domains into the 1 Exchange email account
    So all emails to HP.com and HC.com would be received the 1 user mailbox
    However it is the sending from that is important.... can it be set up so;
    1. if they reply to an email received to HC it will be from HC (i.e. so the customers don't see their email to HC coming from HM)
    2. If they do a new email can they chose to send from HC instead of HM (HM would be the typical default)
    If this set up is possible can anyone forward me to a guide as I would like to test or advise
    Or would they need to do an Office 365 E3 for HM
    and then a hosted Exchange plan from Microsoft for HC
    Any help would b gratefully appreciated
    thanks
    Tris

    Hi Tris,
    Thanks for your question. This is the forum to discuss questions and feedback for Microsoft Office client. There is not so much about Office 365
    Plans/Services/Deployment aspects here, I would suggest you to post in the dedicated forum of
    Office 365 Community, where you can get more experienced responses:
    http://community.office365.com/en-us/f/default.aspx
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Bug in Excel's handling of metadata? Or at least a deviation from the Open Office XML specification?

    I've discovered some very strange behaviour in Excel which seems to be contrary to that documented in the Open Office XML specification (OOXML). I couldn't find a way to report bugs against Excel, so I thought I'd try to explain the issue here.
    In short it seems that Excel is removing, and incorrectly re-indexing the metadata I programatically associate with cells.
    First, a summary of the relevant parts of the specification:
    From OOXML 18.9: There are two types of metadata: "cell metadata" and "value metadata".
    Cell metadata follows the cell as it moves. Value metadata follows the value through formulae etc.
    From OOXML 18.3.1.4: The c (cell) element has cm and vm attributes which are both documented as "The zero-based index of the [cell|value] metadata...in the Metadata Part"
    From OOXML 18.9.17: The valueMetadata is "a collection of block element that each define the value metadata for a particular cell". "Cells in the workbook index into this collection".
    The valueMetadata contains bk elements which in turn contain rc (metadata record) elements
    From OOXML 18.9.15: rc elements have t (type index) and v (value index) attributes. t is a 1-based index into metadataTypes and v is a 0-based index into the futureMetadata element which matches the name of the metadata type.
    Here's an example of what this might look like:
    <c vm="0"> <!-- vm points to the first bk inside valueMetadata below -->
    <x:valueMetadata>
    <x:bk>
    <x:rc t="1" v="0" /> <!-- t points to the first metadataType below. v points to the first bk in the futureMetadata below (whose name matches the metadataType to which t points) -->
    </x:bk>
    </x:valueMetadata>
    <x:metadataTypes>
    <x:metadataType name="MyMetaType" ... /> <!-- name dictates which futureMetadata valueMetadata's v attribute indexes into -->
    </x:metadataTypes>
    <x:futureMetadata name="MyMetaType" ...>
    <x:bk>
    <x:extLst>
    <x:ext xmlns:x="http://schemas.openxmlformats.org/spreadsheetml/2006/main" uri="http://example.com/extension" p5:value="test value" xmlns:p5="http://example.com/extension" />
    </x:extLst>
    </x:bk>
    </x:futureMetadata>
    The Problem
    From what I can tell, for values of n > 2, if you associate n cells with metadata, Excel will drop the last piece of metadata, and the one at index 1, and it will do so silently. The indices are then 0..n-3, and the association for all but the first (0
    index) will be wrong. This renders the future metadata totally useless.
    For n == 1, Excel just removes the last piece of metadata (index 1). If we try 1-based indexes for the vm attribute on the c element, we get different behaviour. This may not be relevant as it is contrary to the specification, but the slightly better behaviour
    might indicate an off-by-one error:
    n
    Deleted Indices (0-based) when using 0-based indices
    Deleted Indices (0-based) when using 1-based indices
    1
    0
    None
    2
    1
    1
    3
    1,2
    1
    4
    1,3
    1
    5
    1,4
    1
    6
    1,5
    1
    Demonstrating the Problem
    I have some example code[1] that demonstrates the problem. You will need a file called test.xlsx with cells A1..C2 populated.
    Compile the source as AddMetadata.exe then run with the test file as the only parameter:
    > AddMetadata.exe test.xlsx
    You can look at test.xlsx in Excel, Visual Studio (with the Open XML Package Editor Power Tool for Visual Studio 2010) or the Open XML SDK 2.0 Productivity Tool for Microsoft Office. Looking at the file before and after running AddMetadata.exe you should
    be able to reproduce the behaviour documented above.
    Summary
    It would be good to know if this is really an Excel bug or whether we're doing something wrong / unsupported. Any insight would be very much appreciated.
    [1] The Example code:
    namespace AddMetadata
    using System;
    using System.Linq;
    using DocumentFormat.OpenXml;
    using DocumentFormat.OpenXml.Packaging;
    using DocumentFormat.OpenXml.Spreadsheet;
    public class Program
    // The cells to associate with metadata
    private readonly static CellSpec[] CellSpecs = new[]
    new CellSpec{ Sheet = "Sheet1", Column = "A", Row = 1 },
    new CellSpec{ Sheet = "Sheet1", Column = "B", Row = 1 },
    new CellSpec{ Sheet = "Sheet1", Column = "C", Row = 1 },
    new CellSpec{ Sheet = "Sheet1", Column = "A", Row = 2 },
    new CellSpec{ Sheet = "Sheet1", Column = "B", Row = 2 },
    new CellSpec{ Sheet = "Sheet1", Column = "C", Row = 2 },
    private static readonly uint NumCells = (uint)CellSpecs.Length;
    private const string SPREADSHEET_ML_NS = "http://schemas.openxmlformats.org/spreadsheetml/2006/main";
    private const string METADATA_TYPE_NAME = "MyMetaType";
    private const string EXTENSION_URI = "http://example.com/extension";
    public static void Main(string[] args)
    if (args.Length != 1)
    Console.Out.WriteLine("AddMetadata <doc.xslx>");
    Console.Out.WriteLine(" Adds metadata to the specified document to demonstate some strange Excel behaviour");
    Environment.Exit(1);
    try
    var doc = SpreadsheetDocument.Open(args[0], true);
    StripMetadata(doc);
    AddMetadata(doc);
    AddMetadataType(doc);
    AddFutureMetadata(doc);
    AddMetadataRecords(doc);
    AssociateCellsWithMetadata(doc);
    doc.WorkbookPart.Workbook.Save();
    doc.Close();
    catch(Exception e)
    Console.Out.WriteLine(e);
    /// <summary>
    /// Strip any existing metadata.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void StripMetadata(SpreadsheetDocument doc)
    var wbPart = doc.WorkbookPart;
    var cellMetadataPart = wbPart.GetPartsOfType<CellMetadataPart>().FirstOrDefault();
    wbPart.DeletePart(cellMetadataPart);
    /// <summary>
    /// Add basic metadata part structure.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void AddMetadata(SpreadsheetDocument doc)
    doc.WorkbookPart.AddNewPart<CellMetadataPart>();
    doc.WorkbookPart.CellMetadataPart.Metadata = new Metadata { MetadataTypes = new MetadataTypes() };
    /// <summary>
    /// Add the metadata type used by all the metadata we're adding
    /// </summary>
    /// <param name="doc"></param>
    private static void AddMetadataType(SpreadsheetDocument doc)
    var metadata = doc.WorkbookPart.CellMetadataPart.Metadata;
    var metadataType = new MetadataType
    Name = METADATA_TYPE_NAME,
    Assign = false,
    CellMeta = false,
    ClearContents = false,
    ClearAll = false,
    ClearComments = true,
    ClearFormats = true,
    Coerce = false,
    Copy = true,
    Delete = false,
    Edit = true,
    Merge = true,
    MinSupportedVersion = 0U,
    PasteAll = true,
    PasteBorders = false,
    PasteColWidths = false,
    PasteComments = false,
    PasteDataValidation = false,
    PasteFormats = false,
    PasteFormulas = false,
    PasteNumberFormats = false,
    PasteValues = true,
    RowColumnShift = true,
    SplitAll = false,
    SplitFirst = false
    metadata.MetadataTypes.AppendChild(metadataType);
    /// <summary>
    /// Add future metadata blocks which contain the actual metadata for each cell.
    /// They are referenced by the metadata records.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void AddFutureMetadata(SpreadsheetDocument doc)
    var metadata = doc.WorkbookPart.CellMetadataPart.Metadata;
    var futureMetadata = metadata.AppendChild(new FutureMetadata());
    futureMetadata.Name = METADATA_TYPE_NAME;
    futureMetadata.Count = NumCells;
    // Future metadata area
    for (var i = 0; i < NumCells; i++)
    // The metadata for each cell will be single FutureMetadataBlock containing an extension list with a single extension.
    FutureMetadataBlock futureMetadataBlock = futureMetadata.AppendChild(new FutureMetadataBlock());
    ExtensionList extLst = futureMetadataBlock.AppendChild(new ExtensionList());
    Extension ext = extLst.AppendChild(new Extension());
    ext.Uri = EXTENSION_URI;
    ext.AddNamespaceDeclaration("x", SPREADSHEET_ML_NS);
    ext.SetAttribute(new OpenXmlAttribute("value", ext.Uri, string.Format("test value {0}", i)));
    /// <summary>
    /// Add metadata records which point to each future metadata block.
    /// They are in turn referenced by the cells.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void AddMetadataRecords(SpreadsheetDocument doc)
    var metadata = doc.WorkbookPart.CellMetadataPart.Metadata;
    // Value metadata area
    ValueMetadata valueMetadata = metadata.AppendChild(new ValueMetadata());
    for (uint i = 0; i < NumCells; i++)
    // Type is 1-indexed, index into future metadata is 0-indexed
    var metadataBlock = valueMetadata.AppendChild(new MetadataBlock());
    var metadataRecord = metadataBlock.AppendChild(new MetadataRecord());
    metadataRecord.Val = i;
    metadataRecord.TypeIndex = (uint)1;
    /// <summary>
    /// Associate existing cells with existing metadata.
    /// </summary>
    /// <param name="doc">The document</param>
    private static void AssociateCellsWithMetadata(SpreadsheetDocument doc)
    for (uint i = 0; i < CellSpecs.Length; i++)
    var cellSpec = CellSpecs[i];
    var cell = GetCell(doc, cellSpec.Sheet, cellSpec.Column, cellSpec.Row);
    if (cell == null)
    throw new ArgumentException(string.Format("Cell {0} not found in row {1} of sheet {2}", cellSpec.Column, cellSpec.Row, cellSpec.Sheet));
    cell.ValueMetaIndex = i;
    /// <summary>
    /// Get a cell given the document, sheet name, column name and row index.
    /// </summary>
    /// <param name="doc">The document</param>
    /// <param name="sheetName">The sheet name</param>
    /// <param name="columnName">The column name</param>
    /// <param name="rowIndex">The row index</param>
    /// <returns>The cell</returns>
    private static Cell GetCell(SpreadsheetDocument doc, String sheetName, String columnName, uint rowIndex)
    var row = GetRow(doc, sheetName, rowIndex);
    if (row == null)
    throw new ArgumentException(string.Format("Row '{0}' not found", rowIndex));
    return row.Elements<Cell>().Where(c => c.CellReference.Value.StartsWith(columnName)).FirstOrDefault();
    /// <summary>
    /// Get a worksheet part by sheet name.
    /// </summary>
    /// <param name="document">The document</param>
    /// <param name="name">The sheet name</param>
    /// <returns>The worksheet part</returns>
    private static WorksheetPart GetWorksheetPartByName(SpreadsheetDocument document, string name)
    // Get Sheet by name from Sheets in Workbook
    var sheet = document.WorkbookPart.Workbook.GetFirstChild<Sheets>().Elements<Sheet>().Where(x => x.Name == name).FirstOrDefault();
    // Lookup WorksheetPart by Id
    return sheet == null ? null : (WorksheetPart)document.WorkbookPart.GetPartById(sheet.Id.Value);
    /// <summary>
    /// Get a row given the document, sheet name and row index.
    /// </summary>
    /// <param name="doc">The document</param>
    /// <param name="sheetName">The sheet name</param>
    /// <param name="rowIndex">The row index</param>
    /// <returns>The row</returns>
    private static Row GetRow(SpreadsheetDocument doc, String sheetName, uint rowIndex)
    var worksheetPart = GetWorksheetPartByName(doc, sheetName);
    if (worksheetPart == null)
    throw new ArgumentException(string.Format("Sheet '{0}' not found", sheetName));
    return worksheetPart.Worksheet.GetFirstChild<SheetData>().Elements<Row>().Where(r => r.RowIndex == rowIndex).First();
    struct CellSpec
    public string Sheet;
    public string Column;
    public uint Row;

    If you create a metadatatype with a single metdata block, and you reference that in your vm/cm cell attribute using a *one* based index, Excel seems to see the link and it honors it when saving the spreadsheet.
    So, I ended up with something like:
    <c ... cm="1"/> (I'm dealing with cell metadata, but the concept is equivalente to value metadata)
    <metadataTypes count="1">
      <metadataType name="MyMetaType" .../>
    </metadataTypes>
    <futureMetadata count="1" name="MyMetaType">
      <bk>
        <extLst><ext
    uri="http://example" xmlns:x="http://example"><x:val>87</x:val></ext></extLst>
      </bk>
    </futureMetadata>
    <cellMetadata count="1">
      <bk><rc
    t="1" v="0"/></bk> <!-- this is what gets referenced as cm=1 on the cell -->
    </cellMetadata>
    Hope this helps. 

  • Is Office Home and Business 2013 fully compatible with Sharepoint Online (Office 365)?

    My client recently upgraded 3 Windows 7 PCs (2-32 & 1-64-bit OS) from Office 2007 32-bit (which was actually working fine against Exchange/SharePoint Online) to Office Home and Business 2013 (32-bit)
    Now, for all 3 PCs, while Office 2013 Word/Excel can open, check out/in, and save SharePoint Online files, there is ALWAYS a 2 minute delay in closing the file which is apparently waiting for the Local Security Authority call to return. This seems
    to indicate an issue related to SharePoint security on the client side.
      Problem Event Name: AppHangXProcB1
      Application Name:        
    WINWORD.EXE
      Application Version:    
    15.0.4657.1000
      Waiting on Application Name: 
    lsass.exe:lsasspirpc
    This is the Local Security Authority Security Support Provider Interface Remote Procedure Call (LSA SSPI RPC)
    My client has 66 licenses for SharePoint Online (Plan 2) and 73 Exchange Online (Plan 1) "stand alone" services. The same failure is happening on 3 Win 7 PCs. All of which I've carefully reviewed against the MS Office trouble shooting guides (start
    Windows OS w/out non-MS services, Word/Excel safe mode w/out add-ons, O365 readiness checks, Office repair, etc.). We have PCs running Win 7 (32 & 64-bit) w/Office 365 ProPlus & Office Professional Plus 2013 that work fine. it's JUST these 3 Win 7
    PCs that were upgraded from Office 2007 to Office Home and Business 2013 that have the 2 min. SharePoint file close time.
    Can you please confirm that Office Home and Business 2013 is compatible w/SharePoint Online
    at least for Excel and Word?
    The "slow close" problem can be demonstrated on multiple site collections/sub sites and w/Excel & Word docs in doc libs and lists
    After many hours capturing information, following the MS Office trouble shooting guides, and repairing the Office install, I've had no luck in resolving this.While Word/Excel will eventually close SharePoint Online files after about
    2 minutes, this is certainly unacceptable. Otherwise, locally stored files close normally and new files were created by the Office 2013 Excel/Word for this testing.
    Any thoughts or guidance would be appreciated.  

    Hi raygabe,
    I couldn't find the document mentioned there is any compatibility between Office365 SharePoint online and Office Home and Business 2013 version, I would recommend that you check if the issue could be reproduced on other Win7 machines installed with Office
    Home and Business 2013 installed directly instead of upgrading from Office2007, see if issue is related to Office application upgrade.
    I also recommend that you post this issue on our dedicated Office365 SharePoint online forum and Office 2013 forum for a better assistance with more experts regarding this issue from the following links.
    http://community.office365.com/en-us/f/154.aspx
    https://social.technet.microsoft.com/Forums/office/en-us/home?category=officeitpro
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you havefeedback for TechNet Subscriber Support, contact [email protected] 
    Daniel Yang
    TechNet Community Support

  • Office 365 downgrade for Office 2010 Product Key

    Hi,
    I just would like to inquire if it is possible to downgrade the Office 365 that was purchased from a vendor.  The vendor specifically assured us that there would be product keys that would be given and we would be able to use it in on our existing Office
    2010 products.  But unfortunately, it does not work.
    The vendor is no longer answering our calls, emails text messages, etc after he has received the payment for the Office 365.  
    We are located in Riyadh, Saudi Arabia.
    Thanks in advance.

    Hi,
    Who is that vendor? What did they tell you in detail?
    In this forum we mainly discuss technical questions about Office products, for the purchase and activation questions, I suggest you contact your local customer service.
    You should be able to find your local customer service number from this link:
    https://support.microsoft.com/en-us/gp/customer-service-phone-numbers/en-us?wa=wsignin1.0
    Regards,
    Melon Chen
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs. Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Office 365 Shared External Contacts - how do I delegate Edit and Update permissions to users

    Hello
    Office 365 Shared External Contacts - how do I delegate Create/Update/Delete/Edit permissions to users who are not Admins? These Contacts are in the Global Address List. Not Outlook personal Contacts. O365 Small Business Premium

    Hi,
    To grant users delegate permissions, open Outlook, go to FILE -> Info -> Account Settings -> Delegate Access -> Add -> Search and add the user, click OK -> Edit the permission of the user. We can set different permissions in the dropbox
    of Contacts.
    There are four permisssions for Contacts:
    1. None
    2. Reviewer (can read items)
    3. Author (can read and create items)
    4. Editor (can read, create, and modify items)
    Select the permission that you want to grant the user.
    We can also modify the permission later in this section.
    I hope the information is helpful, if I misunderstood anything, feel free to correct me and provide more detailed description of the question.
    Regards,
    Melon Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • Access to my Office 365 third-party app for external user : "a User account is not registered for the account"

    In my third-party web application of Office 365, I want to have access to the contacts, events and emails of all the users from the organizations who installed my app. The thing is I don't want that all these users have to grant me access, I just want one
    admin of the org to grant access for my app and then be able to retrieve the data I need for all the users.
    To test for one organization, I logged in as the admin and proceed to the Oauth2 authentication to retrieve the access token and in the first request (the GET one to retrieve an authorization code) i add the parameter
    prompt=admin_consent.
    With this access token, I can access the data (emails, contact, event) of the admin
    for instance for the contacts
    uri: https://outlook.office365.com/ews/odata/Users(adminemail)/Contacts
    but not the data of the other users of this org with this uri
    uri: https://outlook.office365.com/ews/odata/Users(useremail)/Contacts
    The only thing I can do is retrieve an access token for each user but it supposed that each user has to authorize the access to the app but it's very cumbersome. So, i don't see what enables the parameter prompt=admin_consent and how to use it. Does anybody
    know what it does?
    And my question is: how can I do to access the data of all the users of one organization when the access has been granted by one admin?
    Thank you!

        
    This was answered on StackOverflow by Dushyant Gill.  http://stackoverflow.com/questions/25316175/access-to-my-office-365-third-party-app-for-external-user-a-user-account-is-n/25316678#25316678
    You are sending the OAuth request to a tenant specific endpoint of Azure AD. Note the {key_provided} part of your Url - that part represents the tenantid or a registered domain name of an Azure AD tenant. Azure AD throws this error is the user signing in
    is not a user in that tenant.
    Multi-tenant applications like yours have two options:
    Perform home realm discovery yourself and send the SSO request to the correct tenant-specific endpoint of Azure AD: when a new Azure AD organization signs-up for your application, record its tenant ID, and registered domain names. On your login page, ask
    the user for their email and try to discover what Org they belong to using the suffix the email.
    Use the common endpoint of Azure AD. Instead of the {key_provided} part of the URL, use 'common'. In this case Azure AD will determine the user's tenant and sign-in the user. The token that your application will receive will still be from the user's tenant
    (iss claim).
    2 is more convenient for apps. However #1 has an advantage when the user's Organization has customized their sign-in page with the company logo etc - in the case of #1 the user will directly be taken to the customized and familiar sign-in page.
    I recommend a combination of the two: try determining the user's organization and sending them to the tenant specific SSO endpoint. If you're not able to - send them to the common endpoint.

  • Why do we have to re-register Office 365 every time we use one of the applications?

    We purchased the 5 user package and 1st and 2nd machines seem to work fine and do not require logging into the cloud to use the products, but on the third one we have to register the products every time we try to use it.  The pc having the issue is
    running Win 8.1 we have 5 different profiles on this machine. Each one has to be re-registered each time we try to use an application.  We are not storing anything in the cloud because  we do not need too.  It would be good for the kids
    to be able to write their school reports without having to save them on the cloud.  Our local backup system works just fine and they only have the computer to use - no phones, pads, etc that they need to access stuff on.
    We contacted the office store support who told us that we did not need to login if all of our documents were stored locally.  We specifically asked if all user with profiles on the machine were allowed to use the applications and they assured us that
    Yes they could use them.
    The person who owns the subscription is not always home to login for us to re-register the product and get the special code on her cell to fix the applications so we can use them. 
    So what do we need to do to fix (remove) this irritating feature of Office 365? Is their a registry setting we can put in to bypass this?

    Hi,
    Since this issue is related to Office 365, I recommend you post the questions to Office 365 forum:
    http://community.office365.com/en-us/f/default.aspx
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

Maybe you are looking for