Exemplo n.º 1
0
        private string GetWorksheetName(string file_path, string res_id)
        {
            string        ret      = String.Empty;
            List <string> tmp_path = new List <string>();

            xml_workbook.FillXmlElements(xml_workbook.Document);
            foreach (XmlElement el in xml_workbook.FindNodes("sheet"))
            {
                tmp_path = CommonFacilities.Common.ExplodeString(file_path, "\\");
                if (el.Attributes["r:id"].Value == res_id)
                {
                    // Seeking filename in realtionships
                    return(el.Attributes["name"].Value);
                }
            }
            return(ret);
        }
Exemplo n.º 2
0
        private string GetResourceId(string file_path)
        {
            string        ret      = String.Empty;
            List <string> tmp_path = new List <string>();

            xml_wb_rels.FillXmlElements(xml_wb_rels.Document);
            foreach (XmlElement el in xml_wb_rels.FindNodes("Relationship"))
            {
                tmp_path = CommonFacilities.Common.ExplodeString(file_path, "\\");
                if ((el.Attributes["Target"].Value).IndexOf(tmp_path[tmp_path.Count - 1]) > -1)
                {
                    // Seeking filename in realtionships
                    return(el.Attributes["Id"].Value);
                }
            }
            return(ret);
        }