Adding an extra S to one word when exporting to csv

Discuss the spreadsheet application
Post Reply
waynec444
Posts: 84
Joined: Wed Jan 21, 2015 6:09 am

Adding an extra S to one word when exporting to csv

Post by waynec444 »

This is very strange but true:

I exported a large file to csv (and then imported it into a database program).

Calc did something strange:

In the csv file: for every entry of /lifestyle/ or /lifestyles/ (in the csv file) it added an extra S at the end:

/lifestyles/ or if it already had /lifestyles/ it added another S at the end:

/lifestyless/

These are the ONLY strings that this happened to and it happened to ALL of them. Note that the above is part of multiple URLs.

What gives?
Open Office 4.1.10 on Windows Vista
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Adding an extra S to one word when exporting to csv

Post by RusselB »

I can't say for sure, but one option that occurs to me is that the exportation is using a regex so that the s/ is being taken to add an extra last character.
You might be able to confirm that this is not the case if you have other words that end in the s/ that do not obtain the extra S
If you can't confirm or deny that this is a possibility, based on your actual data, then the only option for a better answer that I can think of will require a sample file to be uploaded/attached so that we can examine the file and test ourselves.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
waynec444
Posts: 84
Joined: Wed Jan 21, 2015 6:09 am

Re: Adding an extra S to one word when exporting to csv

Post by waynec444 »

It has nothing to do with the /s as it also does it without the s (lifestyle/ only). It seems to favor the word "lifestyle" to add the extra s to it.

As the data is not public I cannot upload the file. Hope you understand.
Open Office 4.1.10 on Windows Vista
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Adding an extra S to one word when exporting to csv

Post by Villeroy »

waynec444 wrote:As the data is not public I cannot upload the file. Hope you understand.
Nobody understands anything without having a file helping to reproduce this weirdness. The content of the file does not matter. Just some file and exact instructions what to do with it in order to get the same weird results.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
robleyd
Moderator
Posts: 5087
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Adding an extra S to one word when exporting to csv

Post by robleyd »

A post in [Forum] How to attach a document here gives some ideas for anonymising your data.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
waynec444
Posts: 84
Joined: Wed Jan 21, 2015 6:09 am

Re: Adding an extra S to one word when exporting to csv

Post by waynec444 »

Great. Here is the anonymized attached file. Remember, the problem is with ONLY lifestyle and lifestyles. No other words have been modified with the added S or in any other way.

Please note the file was much larger than allowed for upload. So I removed almost all FROM THE MIDDLE. Left intact the start and end of the document.
Attachments
forupload.csv
(63.74 KiB) Downloaded 90 times
Open Office 4.1.10 on Windows Vista
User avatar
robleyd
Moderator
Posts: 5087
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Adding an extra S to one word when exporting to csv

Post by robleyd »

The sample file has only one occurrence of the string "lifestyle, viz.:
xxxxx://xxxxxxxxxxxx.xxx/Cxxxxxx/Dxxxxxx/LIFESTYLE/-3/1213,
Your original question says "In the csv file: for every entry of /lifestyle/ or /lifestyles/ (in the csv file) it added an extra S at the end:". The content of the csv file you provided doesn't show this behaviour.

Have you checked the actual content of a csv file and seen this in the file? If not, it might be somehow related to the process of importing into the unspecified database?
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
Post Reply