Esempio n. 1
0
 public StringKey(string key)
 {
     Value = new Excel.SharedStringItem {
         Text = new Excel.Text(key)
     };
     Key = key;
 }
 private string GetCellValue(WorkbookPart workbook, OpenXmlReader reader)
 {
     OpenXML.Cell c = (OpenXML.Cell)reader.LoadCurrentElement();
     if (c.DataType != null && c.DataType == OpenXML.CellValues.SharedString)
     {
         OpenXML.SharedStringItem ssi = workbook.SharedStringTablePart.
                                        SharedStringTable.Elements <OpenXML.SharedStringItem>().ElementAt
                                            (int.Parse(c.CellValue.InnerText));
         return(ssi.Text.Text);
     }
     else
     {
         return(c.CellValue.InnerText);
     }
 }
Esempio n. 3
0
 public StringKey(Excel.SharedStringItem item)
 {
     Value = item;
     Key   = item.InnerText;
 }