Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#122 Multiple lined cells

open-accepted
Davide Ficano
5
2011-04-20
2011-04-18
FinalMatrix
No

With Notepad and Excel I got a problem on multiple lined cells, on the HTML side separated by <BR>.
Because this I did a short and ugly workaround, and changed the following line in common.js:
this.newLine = table2clipboard.common.isOSWin() ? "\r\n" : "\n";

to

this.newLine = table2clipboard.common.isOSWin() ? "\n" : "\n";

I am using a MS Excel, German version.
For me now it works very well, but the problem for your AddOn is to handle this and keep a correct standard row separation.

Discussion

  • FinalMatrix
    FinalMatrix
    2011-04-19

    Hi dafi,

    I have tried another little quick and dirty workaround for MS Excel.
    Because I could not fix the HTML output properly, I just removed the code for adding the HTML transfer data to clipboard in t2cOverlay.js:

    xferable.addDataFlavor("text/html");
    var htmlstring = Components.classes["@mozilla.org/supports-string;1"]
    .createInstance(Components.interfaces.nsISupportsString);
    htmlstring.data = textHtml;
    xferable.setTransferData("text/html", htmlstring, textHtml.length * 2);

    Now my Excel is forced to use the CSV clipboard data and I can copy the tables with multiple lined cells directly into Excel without using a Notepad between.

    By the way, you did a fine job with this AddOn!

     
  • Davide Ficano
    Davide Ficano
    2011-04-20

    • status: open --> open-accepted
     
  • Davide Ficano
    Davide Ficano
    2011-04-20

    Thanks a lot for your help and suggestions I hope to fix this bug very soon