Your interactive trading laboratory!
 • 
13 users online

Paste lists into Excel issues
This is a Feature Request with 2 votes

I'm getting inconsistent paste results with various copy/paste attempts out of QS and into Excel 365. For example, the Positions List header splits on every space instead of being grouped into strings, so I get the following list of 16 columns:

Position	Symbol	Shares	Entry	Date	Entry	Price	Exit	Date	Exit	Price	Profit	%	Profit	Bars	Held

while the actual data only occupy 10 columns. It worked for me at first, but sometime in the past few weeks it stopped working for me, so now I have to go through extra steps to clean the headers up when I paste. It also happens with other similar viewers (like "By Symbol") but also with some unexpected ones like "Monthly Returns". For that one, the problem is that blank values in some months are ignored completely by Excel, moving the real values into the wrong months for any partial years (ie, in the first and last years of a multiyear backtest).

In addition to the backtest viewers, I have the same problem with pasting signals out of the Signal Hub. And finally I would like to copy/paste out of the Quotes and Price Triggers panel, but there is no option to copy them, at least that I have found (ie, not with a right click of the mouse, or Ctrl-C of the keyboard). But that's a Feature Request, not a bug. I'm not sure when this started misbehaving, it could have been after a QS update, but am not sure. I don't think I changed any settings in Excel which might cause this?? but I'd be happy to learn of the fix within Excel if anyone knows about it. "Paste Special" doesn't have any special helpers for this problem (ie, just choose between "Unicode Text" and "Text", but there is no change).

I see by pasting into a text editor that these are simply tab-separated values. Could the solution be as simple as putting "Quotation Marks" around each string, instead of only using tabs? I tried this just now, using the text editor, and if every string has quotes, they import (paste) in correctly. Further, if blanks are input as two quotes with no spaces (""), then they work properly too. I've tested this for all the ones mentioned above. However, it should be noted that the Signal Hub copy paste issues has an additional problem of the first column being a symbol, not a text value. But if this is replaced in the Copy method by some meaningful glyph, it would then work too (or just another "" to skip the signal) this should work too.

Attachment

Cancel

Responses

Hmmm, this isn't happening at my end using current Excel 365. Here's the screen shot of my Positions paste. Have you played around with any paste settings in Excel, for example?

Hmmm, this isn't happening at my end using current Excel 365. Here's the screen shot of my Positions paste. Have you played around with any paste settings in Excel, [for example?](https://superuser.com/questions/601348/tab-t-is-not-recognized-as-columns-delimiter-when-pasting-into-excel-2013)

Thanks glitch, that works. I've been using Excel all these years and never knew that it would take its cue for copy/pastes from that source. I had both tabs and spaces selected, which matches the behavior I saw. So thanks for that link.

However.... my proposed solution does stand, quoting those strings (including empty cells like in the Monthly Returns) during the Copy method does not actually put quotes into the Paste in Excel, but does prevent Excel from breaking them up improperly if one has the Space delimiter set, thus avoiding this issue for other dummies who don't bother googling for an answer but instead assume it's a problem of the software where the Copy took place. ;-P

Thanks glitch, that works. I've been using Excel all these years and never knew that it would take its cue for copy/pastes from that source. I had both tabs and spaces selected, which matches the behavior I saw. So thanks for that link. However.... my proposed solution does stand, quoting those strings (including empty cells like in the Monthly Returns) during the Copy method does not actually put quotes into the Paste in Excel, but does prevent Excel from breaking them up improperly if one has the Space delimiter set, thus avoiding this issue for other dummies who don't bother googling for an answer but instead assume it's a problem of the software where the Copy took place. ;-P

Agreed, it will be an easy change to add quotes around these items.

Agreed, it will be an easy change to add quotes around these items.
Forum Tips

Please sign in if you want to participate in our forum.

Our forum uses Markdown syntax to format posts.

To embed code snippets, enclose them in [CODE][/CODE] tags.