Text to Columns Exported CSV

  • Posts: 146
  • Thank you received: 2
10 years 2 months ago #170300

-- HikaShop version -- : lastest
-- Joomla version -- : 3.3.1

Trying to properly set up my csv file for import. However, when I export what is currently in the store demo and open up the csv using excel is breaks up the entries into multiple columns, because the description has commas. I then cannot use the "Text to Columns" function to see the the structure.

Any work around?

Attachments:
Last edit: 10 years 2 months ago by sison2466.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 months ago #170317

Hi,

When you open the CSV file in to Excel, you have to choose the column delimiter.
You have to use ";" and only ";". If you select another delimiter, Excel could read the CSV wrong and display something unreadable.

I open the CSV you attached, it's good ; no problem.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Last edit: 10 years 2 months ago by Jerome.

Please Log in or Create an account to join the conversation.

  • Posts: 146
  • Thank you received: 2
10 years 2 months ago #170363

Can you take another look please? MOST of the lines are fine, but several lines get broken up, at the product description, even if I use ";" as the only delimiter. Please see lines 57, 96, 98, 105, 113, or 197 in the attached file. I have tried Excel, Google Sheets, and Libre Office.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #170385

Hi,

I checked this csv file and it seems to be correct, the line 57 don't have any problem at the product description.
I'm using Excel.

Please Log in or Create an account to join the conversation.

  • Posts: 146
  • Thank you received: 2
10 years 2 months ago #170436

Wow. I must be doing something wrong. I double click to open in Excel, then choose Text to Columns, then choose demlimited, then ONLY choose ";"

I still get the descriptions split. See attached screenshots below...struggling and frustrated over here.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 2 months ago #170440

Hi,

Like previously, not a single problem.
Please check that you're right opening the CSV as a CSV using " ; " as delimiter and double quote (") as text delimiter.
It is one of the main rules of the CSV format.
en.wikipedia.org/wiki/Comma-separated_values

I don't have Excel, I'm using OpenOffice/LibreOffice. But a lot of users are using Excel for the CSV (or HikaShop team, like Xavier) and they didn't have special problem, so I suppose that one main option is not right when you open the file.
But for more details, I will suggest you to see with Excel support ; it is outside our knowledge.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 146
  • Thank you received: 2
10 years 1 month ago #173488

Actually, started troubleshooting. I don't think it is an Excel issue. If you look at the raw CSV file, even before opening it up in Excel or Libre. Please look at the attached export CSV in a text editor (Notepad).

There are several lines, where the export has a hard return, causing parts of the entry to start a new line. It's not a delimiter issue, there is an actual line break.

In the screenshot (LibreOffice Import Settings.jpg), you can see the CSV settings in LibreOffice and the CSV has already has a new line under the entry for 1847 (1% Spandex).

Please look at lines AFTER 1847, 2136, 2139, 2161 as examples in the attached CSV for examples.

Does that make sense?

Attachments:
Last edit: 10 years 1 month ago by sison2466.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 1 month ago #173497

Here is what I have when I open your CSV with LibreOffice on my end: take.ms/alRV7
As you can see there is no problem.
I see that in the "text delemiter" option of your LibreOffice you don't have the double quotes selected while I do have them selected on my end (as far as I know " is there by default).

Please Log in or Create an account to join the conversation.

  • Posts: 146
  • Thank you received: 2
10 years 1 month ago #173571

It is still getting truncated. I believe if you scroll right in your example (take.ms/alRV7), Column S (product_keywords) will show 1% Spandex under item # 1847. If you look at the attached picture or if you open the original CSV in notepad, you can see that there is a linebreak on item # 1847 that separates the line "91% Polyester, 8% Nylon, 1% Spandex", which is not allowing the entire line to be read properly.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
10 years 1 month ago #173581

Hi,

CSV format allow line break (carriage return) into text cells.
So there is not specific problem if the software read correctly the CSV like OpenOffice/LibreOffrice or Microsoft Office.

en.wikipedia.org/wiki/Comma-separated_values

Fields with embedded line breaks must be quoted (however, many CSV implementations simply do not support this).


Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 146
  • Thank you received: 2
10 years 1 month ago #173655

Does that mean in your example (take.ms/alRV7), Column S (product_keywords) does not show 1% Spandex under item # 1847, but instead shows the whole description (91% Polyester, 8% Nylon, and 1% Spandex)? If it only shows 1% Spandex like mine, then it would seem that something is not importing properly, correct?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 1 month ago #173659

Yes, on my end, libreOffice shows the full description: take.ms/rEsUI
So everything looks fine.

Please Log in or Create an account to join the conversation.

  • Posts: 146
  • Thank you received: 2
10 years 1 month ago #173922

OK. I think I understand now. the row height wasn't high enough to see the rest of the description. Thanks.

Please Log in or Create an account to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum