在字符串中查找十六进制值并使用C#替换它们 [英] Find hex values in string and replace them using C#
问题描述
我正在使用 Microsoft.Office.Interop
。
然后我修改内容并使用它创建新的ppt。在从power point读取幻灯片对象的形状时,一些textobject中包含十六进制值。当我尝试将它们导入我的编辑器时会产生问题。
page.Xml.Add(XElement.Parse(string.Format) (@strXml)));
这里strXml包含一些十六进制字符。我得到例外 '
。由于在不同的幻灯片文本对象中出现各种十六进制代码,每次都不同。如何找到这些十六进制值并替换(或删除如果在创建最终
',十六进制值0x0B,无效字符
ppt媒体时它不会产生问题)
Hi Milind,
感谢您在MSDN论坛上发帖。
我正试图让一些高级工程师参与这个问题,这需要一些时间。非常感谢您的耐心。
抱歉给您带来不便,祝您有个愉快的一天!
祝你好运,
I am importing powerpoint presentation to my editor using Microsoft.Office.Interop
.
Then i modify the content and create the new ppt using it. While reading the shape of slide object from power point, some textobject have hex values in it. which creates the problem when i try to import them to my editor.
page.Xml.Add(XElement.Parse(string.Format(@strXml)));
here strXml contents some hex characters. and i get the exception '
', hexadecimal value 0x0B, is an invalid character
. and its different every time due to occurrence of various hex codes in different slide text object. How can i find those hex values and replace(or remove if its not gonna create the problem when final
ppt media is created)
Hi Milind,
Thank you for posting in the MSDN Forum.
I'm trying to involve some senior engineers into this issue and it will take some time. Your patience will be greatly appreciated.
Sorry for any inconvenience and have a nice day!
Best regards,
这篇关于在字符串中查找十六进制值并使用C#替换它们的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!