qa:c# text string Insert double quotation marks: @ Usage and backslash usage

Source: Internet
Author: User

Add hyperlinks in Excel, you can use the hyperlink formula, that is, =hyperlink (Src,display);

In the example in StackOverflow: http://stackoverflow.com/questions/2905633/add-hyperlink-to-cell-in-excel-2007-using-open-xml-sdk-2-0

New Cellformula () {Space =@ "HYPERLINK (" "Http://www.theclash.com" "," "Radio Clash" ")" ;

In the above method, the @ means that the string after it can be treated as a normal string, regardless of the escape that might be thrown by the backslash. The double quotation marks included in the normal string are represented by 2 double quotation marks.

However, when you replace a link with a variable, it is not advisable, and the key is the limit of the @ usage.

You can use string concatenation directly, and for double quotes, escape characters with backslashes.

url= " http://www.theclash.com ";

Txt=string.concat ("HYPERLINK (\" ", url," \ ", \" Radio clash\ ")");

qa:c# text string Insert double quotation marks: @ Usage and backslash usage

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.