This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 219294 - wrapped rows while copying result set
Summary: wrapped rows while copying result set
Status: RESOLVED WORKSFORME
Alias: None
Product: db
Classification: Unclassified
Component: Show Data (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-02 02:41 UTC by pedalshoe
Modified: 2012-12-05 14:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pedalshoe 2012-10-02 02:41:52 UTC
NetBeans IDE 7.2 (Build 201207171143) - PC
NetBeans IDE 7.1 (Build 201112071828) - MAC

after a query is finished, i want to copy results from the grid to xls.
i select all columns and rows (5 columns and < 20 rows)
and right click and choose "Copy row values with header" or "Copy row values"
when i paste into xls or in any other editor the last two columns are wrapped

for instance a result set in NetBeans

A B C D E
1 2 3 4 5

After paste into another editor; results look like this:
1 2 3
  4 5


my sql statment: (i'm not sure if the header names are causing it)
select dayofmonth(ts), hour(ts), rid, count(*), count(*)*2221  from pir where dayofmonth(ts)=1 group by hour(ts), rid;


When I remove one of the result fields (rid for instance; 4 columns now)  there is no wrapping after the  paste.


This same behavior also happens on the MAC Book Pro v7.1 (build: 201112071828) where i was originally working.
Comment 1 pedalshoe 2012-10-02 02:57:37 UTC
I discovered that if NetBeans is maximized, copy paste works correctly.
Comment 2 pedalshoe 2012-10-02 17:18:44 UTC
i spoke too soon, re-sizing temporarily fixed it. I still have the problem
when coping from NetBeans and pasting into any other text editor or excel.

Copied
A B C D E
1 2 3 4 5


Pasted
A B C D E
1 2 3
  4 5


Thank You,
Christopher
Comment 3 matthias42 2012-10-02 19:08:00 UTC
Hey pedalshoe,

could it be that rid contains tab-characters or newline-characters? I just had a closer look at the copy code (see bug #219117) and there are no newlines introduced other than at a real new-line or if they are part of the data.

With the patch in bug #219117 I introduce correct CSV (or better TSV quoting), meaning that data containing newlines or tabs are quoted.

Not sure when the patch gets accepted but it would be interesting to check a nightly build after that. I tested with libreoffice calc and it worked as I would expect.

Greetings

Matthias
Comment 4 Jaroslav Havlin 2012-12-05 14:47:16 UTC
> With the patch in bug #219117 I introduce correct CSV (or better TSV quoting),
> meaning that data containing newlines or tabs are quoted.
The patch was accepted and integrated. It works fine for me even if the copied text contains newlines.
Please, try the latest development build and check if it works for you, too. If not, reopen the bug. Thank you.