惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
PCI Perspectives
PCI Perspectives
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V2EX - 技术
V2EX - 技术
Google DeepMind News
Google DeepMind News
量子位
博客园_首页
S
SegmentFault 最新的问题
S
Secure Thoughts
F
Full Disclosure
H
Hacker News: Front Page
博客园 - 三生石上(FineUI控件)
U
Unit 42
H
Heimdal Security Blog
N
News and Events Feed by Topic
A
About on SuperTechFans
C
CERT Recently Published Vulnerability Notes
Cyberwarzone
Cyberwarzone
Help Net Security
Help Net Security
The Hacker News
The Hacker News
L
LINUX DO - 最新话题
Application and Cybersecurity Blog
Application and Cybersecurity Blog
罗磊的独立博客
N
News | PayPal Newsroom
Spread Privacy
Spread Privacy
C
Cisco Blogs
C
CXSECURITY Database RSS Feed - CXSecurity.com
云风的 BLOG
云风的 BLOG
A
Arctic Wolf
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Simon Willison's Weblog
Simon Willison's Weblog
B
Blog
人人都是产品经理
人人都是产品经理
TaoSecurity Blog
TaoSecurity Blog
博客园 - 【当耐特】
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
Hugging Face - Blog
Hugging Face - Blog
I
InfoQ
D
DataBreaches.Net
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
L
LINUX DO - 热门话题
Google Online Security Blog
Google Online Security Blog
V
Visual Studio Blog
V
Vulnerabilities – Threatpost
Know Your Adversary
Know Your Adversary
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
B
Blog RSS Feed

博客园 - HQT

类似 MSN 的提示窗口 asp.net 1.1 部分按钮不能提交 - canNOT submit issue .NET 2.0 和1.1 共用时,出现"服务器应用程序不可用"的错误. - HQT 检索 COM 类工厂中 CLSID 为 {00024500-0000-0000-C000-000000000046} 的组件时失败,原因是出现以下错误: 80070005 Oracle 数字转换为英文的函数 取中英文数字混合的长度 ( C# + ORACLE ) - HQT 找不到可安装的 ISAM -- ConnectionString 问题.... .net 使用 ACCESS 库一个小问题 SQLServer 安装过程出错 安装程序配置服务器失败 (解决篇) Web 横向打印 Excel 小写金额转大写 可随文本变化而出现不同选择项的文本框+下拉列表选择 获取Excel合并单元格数据-通用方法 关于 Excel 的结束进程的方法讨论 如何判断Excel单元格是否为合并单元格 DNN-HttpModule.UrlRewrite( url重写 ) Xceed Components DNN 4.0 安装 together2.0 for vs.net2003 下载
C# 中转换 vb.net 换行符等Ascii 字符
HQT · 2006-03-02 · via 博客园 - HQT

正常情况下,多数人可能只考虑 \r \n \t 之类的简单表示,
但在使用EXCEL等COM组件时,必须使用类似  VB.NET 的 CHR(Int) 转换到ASCII 字符集.
C# 中类似的用法也很简单:
如 \n 为 (char)10.
但要再转换为string 型才能被正常使用: ((char)10).ToString() // 曾因找这个BUG找了一个晚上。.汗
如在 C# 中调用 EXCEL 的查找替换方法:

// sheet 为某个 Excel.WorkSheet
sheet.Cells.Replace(((char)s).ToString()," ",Excel.XlLookAt.xlPart,Excel.XlSearchOrder.xlByRows,Type.Missing,Type.Missing,Type.Missing,Type.Missing);