Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

When export CSV files column separate error with column value contains CSV comma separator. #32288

Closed
SSSDNSY opened this issue May 13, 2024 · 4 comments

Comments

@SSSDNSY
Copy link

SSSDNSY commented May 13, 2024

Description

As the title description and as we known, The CSV file use the COMMA [ , ] to separate different columns , But in some column data value its contains one or more COMMA ,and the CSV column separate cannot work properly .

Maybe my export setting was error or dbeaver have other solution for export , why we use CSV,because our user need Microsoft's OFFICE's Excel.exe to open it ,Without dbeaver CSV export we have no choise.

It's can not be define as a BUG in feature aspect, if you can add new feature: add new export file type like *.xls or *.xlsx .

DBeaver Version

24.0.3.202404211624

Operating System

windows10

Database and driver

MySQL 8.0.25
MySQL Connector/J mysql-connector-j-8.0.33

Steps to reproduce

DDL

-- test.test definition

CREATE TABLE `test` (
  `id` varchar(32) NOT NULL COMMENT '主键',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='测试表';

DML

INSERT INTO test (id) VALUES('1,112,1');
INSERT INTO test (id) VALUES('102,3');
INSERT INTO test (id) VALUES('3,1');
INSERT INTO test (id) VALUES('4');

Images of reproduce steps

QQ截图20240513105220
QQ截图20240513105234
QQ截图20240513105255
QQ截图20240513105319
QQ截图20240513111033
test_202405131053.csv

Additional context

Thank you to everyone of dbeaver for their contributions to open source projects, as you see , I'm Chinese and the some Chinese translation in export setting not Chinese , So I want to do something for this ,but I have no idea about this, can yours do me a favor or some tips, THANKS again.

@SSSDNSY SSSDNSY changed the title When export CSV files column sperate error whie CSV comma sperator . When export CSV files column separate error with column value contains CSV comma separator. May 13, 2024
@SSSDNSY
Copy link
Author

SSSDNSY commented May 13, 2024

about additional context, I mean some export setting selector English value not Chinese under this image and so on.
QQ截图20240513105255

@E1izabeth
Copy link
Member

The software you use to view csv files uses , as a columns delimiter. There should be a setting to change it. When I open the result of such export in Excel, I don't experience this issue. You can try opening it with Notepad to see, that here we have just a strings in quotes:

"主键"
"1,112,1"
"102,3"
"3,1"
"4"

@SSSDNSY
Copy link
Author

SSSDNSY commented May 20, 2024

Yes, we can change setting with other columns delimiter, but the column value can contains other columns delimiter too. the csv file type only use comma delimiter whatever you have quotes in strings, so I'll close this bug issue and still hope it's can be export by the *.xls or *.xlsx file type in the future .
@E1izabeth

@SSSDNSY SSSDNSY closed this as completed May 20, 2024
@humphreygao
Copy link

@dbeaver dbeaver locked and limited conversation to collaborators May 20, 2024
@E1izabeth E1izabeth converted this issue into discussion #33255 May 20, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

3 participants