Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excel cells with double quotes are not handled properly #15

Open
redchair123 opened this issue Oct 6, 2013 · 0 comments
Open

Excel cells with double quotes are not handled properly #15

redchair123 opened this issue Oct 6, 2013 · 0 comments

Comments

@redchair123
Copy link

Consider:

A1="A
B1="B

If you copy and just handle the plaintext clipboard, you see "A\t"B, which your system treats as a single cell.

The correct way to handle this is to look at the HTML clipboard, because that has the correct content:

<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=ProgId content=Excel.Sheet>
<meta name=Generator content="Microsoft Excel 14">
<link id=Main-File rel=Main-File
href="...">
<link rel=File-List
href="...">
<style>
<!--table
    {mso-displayed-decimal-separator:"\.";
    mso-displayed-thousand-separator:"\,";}
@page
    {margin:1.0in .75in 1.0in .75in;
    mso-header-margin:.5in;
    mso-footer-margin:.5in;}
td
    {padding-top:1px;
    padding-right:1px;
    padding-left:1px;
    mso-ignore:padding;
    color:black;
    font-size:12.0pt;
    font-weight:400;
    font-style:normal;
    text-decoration:none;
    font-family:Calibri, sans-serif;
    mso-font-charset:0;
    mso-number-format:General;
    text-align:general;
    vertical-align:bottom;
    border:none;
    mso-background-source:auto;
    mso-pattern:auto;
    mso-protection:locked visible;
    white-space:nowrap;
    mso-rotate:0;}
-->
</style>
</head>

<body link=blue vlink=purple>

<table border=0 cellpadding=0 cellspacing=0 width=130 style='border-collapse:
 collapse;width:130pt'>
 <col width=65 span=2 style='width:65pt'>
 <tr height=15 style='height:15.0pt'>
<!--StartFragment-->
  <td height=15 width=65 style='height:15.0pt;width:65pt'>&quot;A</td>
  <td width=65 style='width:65pt'>&quot;B</td>
<!--EndFragment-->
 </tr>
</table>

</body>

</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant