Quelle est la différence entre CellValues.InlineString et CellValues.Chaîne en OpenXML?

Je suis en train d'écrire un peu de code pour générer une feuille de calcul Excel et que je ne suis pas sûr de ce que la différence entre CellValues.InlineString et CellValues.Chaîne pour insérer du texte dans les cellules.

Doit-je utiliser ce:

private void UpdateCellTextValue(Cell cell,string cellValue)
{
    InlineString inlineString = new InlineString();
    Text cellValueText = new Text { Text = cellValue };
    inlineString.AppendChild(cellValueText);

    cell.DataType = CellValues.InlineString;
    cell.AppendChild(inlineString); 
}

ce

private void UpdateCellTextValue(Cell cell, string cellValue)
{
    cell.CellValue = new CellValue(cellValue);
    cell.DataType = new EnumValue<CellValues>(CellValues.String);
}

ou tout simplement cette (InsertSharedStringItem retourne l'Id de la nouvellement inséré chaîne partagée élément)

private void SetCellSharedTextValue(Cell cell,string cellValue)
{        
    int stringId = InsertSharedStringItem(cellValue);
    cell.CellValue = new CellValue(stringId.ToString());
    cell.DataType = new EnumValue<CellValues>(CellValues.SharedString);
}

OriginalL'auteur mhttk | 2011-06-24