示例#1
0
        private static ICollection <FileInfo> GetLinkSources(Excel.Workbook workbook)
        {
            List <FileInfo> attachments = new List <FileInfo>();
            Array           links       = (Array)workbook.LinkSources(Excel.XlLink.xlExcelLinks);

            if (links != null)
            {
                foreach (String link in links)
                {
                    FileInfo f = new FileInfo(link);
                    attachments.Add(f);
                }
            }
            return(attachments);
        }