Ejemplo n.º 1
0
        private void ReadContents(string filePath)
        {
            this.filePath = filePath;

            DecompressFolder = Path.GetTempFileName() + @"_excelutility\";
            Directory.CreateDirectory(DecompressFolder);
            new FastZip().ExtractZip(filePath, DecompressFolder, null);

            var contentTypesData = new XElementData(XDocument.Load(string.Format("{0}[Content_Types].xml", DecompressFolder)).Root);

            contentTypes  = new ContentTypes(contentTypesData);
            sharedStrings = new SharedStrings(DecompressFolder + contentTypes.GetSharedStringsPath());
            workbook      = new Workbook(DecompressFolder, contentTypes, sharedStrings);
        }