国际上将多行csv文件导入Excel [英] Import multiline csv files into Excel internationally

查看:219
本文介绍了国际上将多行csv文件导入Excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个.csv文件,我们想要分发给我们的客户,它包含多行条目(即带有换行符的条目)。根据客户的语言设置,文件可能会正确导入到Excel中,也可能不会正确导入到Excel中。通常,我们建议使用导入文件,但是似乎有一些错误与多行条目,所以他们将分裂成单独的行(奇怪的是,这不会发生,直接打开文件)。



对于某些语言(例如英语),带有逗号的csv会正确打开,但不是带分号的文件。
使用其他语言(例如德语),可以直接打开带有分号的csv,但不能使用逗号打开文件。



导入不起作用



示例csv文件(2 csv行):

  A; B; some 
stuff; C;
1; 2; 另一条线; 3;

正确导入(2行带有多行条目):

  AB(some 
stuff)C
1 2(另一行)3

错误导入(3行):

  B; C; some 
stuff; D;
1; 2; 另一条线; 3;

还有另一种干预的可能性 - 选择一个列,然后在数据下按Text到列。这会根据分隔符整齐地分割行,但是仍然不能换行。



可以导入一个csv文件,所以多行条目总是


解决方案

您可能会发现它在openoffice中打开。



在这种情况下,您可以将其另存为excell工作表,并将这两个文件分发给您的客户端。


There is a .csv file we would like to distribute to our customers, it contains multiline entries (i.e. entries with newlines). Depending on the language settings of the customers, the file may or may not be correctly imported into Excel. Normally, we would suggest to use to Import the file, but there seems to be some bug with the multiline entries, so they will 'break apart' into separate lines (curiously, this does not happen when the file is opened directly).

With some languages (e.g. English), a csv with commas is opened correctly, but not a file with semicolons. With other languages (e.g. German), a csv with semicolons can be opened directly, but not a file with commas.

The import doesn't help with the multiline entries.

Sample csv file (2 csv lines):

A; B; "some
stuff"; C;
1; 2; "another line"; 3;

Correct import (2 lines with a multiline entry):

A B (some
stuff) C
1 2 (another line) 3

Wrong import (3 lines):

A; B; C; "some
stuff";D;
1; 2; "another line"; 3;

There is another possibility to intervene - to select a column and press Text to Columns under Data. This splits the lines neatly based on a separator, but still doesn't get around the newlines.

Is it possible to import a csv file, so that multiline entries are always recognized?

解决方案

You will probably find it opens fine in openoffice. I did.

In which case, you can save it as an excell sheet, and distribute both files to your clients.

这篇关于国际上将多行csv文件导入Excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆