ONLYOFFICE / DocumentServer

ONLYOFFICE Docs is a free collaborative online office suite comprising viewers and editors for texts, spreadsheets and presentations, forms and PDF, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
https://www.onlyoffice.com
GNU Affero General Public License v3.0
4.88k stars 1.09k forks source link

Pasting csv into spreadsheet parsing commas within quoted fields #1091

Open mmceldowney opened 3 years ago

mmceldowney commented 3 years ago

Do you want to request a feature or report a bug?

Bug

What is the current behavior?

When pasting CSV into spreadsheet, commas within a quoted field are being seen as delimiters. Example:

"ID","NAME","BIRTHDATE" 1,"Jones,Michael",1983-05-07 00:00:00 2,"Smith,Jenny",1975-03-10 00:00:00

is being parsed as:

ID NAME BIRTHDATE
1 Jones Michael 1983-05-07 00:00:00
2 Smith Jenny 1975-03-10 00:00:00

This only happens when pasting the data into the spreadsheet. If I open a csv file it is parsed correctly.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

See above.

What is the expected behavior?

Commas within quoted fields should be ignored during parsing. So the output of a successful parse should look like this:

ID NAME BIRTHDATE
1 Jones,Michael 1983-05-07 00:00:00
2 Smith,Jenny 1975-03-10 00:00:00

Which versions of DesktopEditors, and which OS are affected by this issue? Did this work in previous versions of DesktopEditors?

Version 6.0.2.10 on Linux (Ubuntu). Unknown if it worked in previous versions, this is the first version I have used.

Rita-Bubnova commented 3 years ago

Hello, @mmceldowney. Thank you for report. I can confirm - this is bug, issue 47879 in our private issue tracker.

Problem reproduces in Document Server.

ShockwaveNN commented 3 years ago

Moving this issue to DocumentServer repo, since it's our base product and problem actual there too