加倍生成CSV的列 [英] Doubling Columns generating a CSV

查看:47
本文介绍了加倍生成CSV的列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


要生成平面文件架构,我已经从file.xsl构建了一个CSV。


1- In这个Excel文件我有一个日语字符,在最终的CSV中被翻译为特殊字符(例如,ƒMƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ):我从xsl转换为csv是错误的(另存为并选择csv扩展名)?


2-在最后的CSV中,我有两倍的列:这是怎么回事?要设置哪些正确的属性?



PS:要生成csv文件,我已经从file.csv创建了一个flatfile模式excel文件,然后我创建了一个生成的适配器项 - >使用适配器服务获取接收端口的绑定文件和一个结构为
a的模式,从MS-SQL查询返回9列(最后在csv文件中加倍。

解决方案

问题1:尝试从您的所有行和列中选择Excel工作表并将其粘贴在
记事本中。 这应该会在记事本文件中为您提供< tab> 分隔数据。 选择其中一个
< tab> 字符并复制它(每个字段之间应该是一个字符)。 然后使用
编辑 - >替换所有
< tab> 字符和''。替换
菜单(将复制的< tab >字符粘贴到"查找内容:"编辑控件中)。  当你运行
文件 - >另存为,请务必选择 Unicode
UTF-8 作为编码。




Hi,

To generate a flat file schema i have constructed a CSV from a file.xsl.

1- In this Excel file i have a japanese characters that in the final CSV are translated as special characters ( such as ƒMƒƒƒoƒWƒ" ƒ{ƒ^ƒ"•t‚«ƒJƒtƒX ): my conversion from xsl to csv is wrong (save as and choose the csv extension)?

2- In the final CSV i have doubling columns: how this is possible? What are the right properties to set?

PS: To generate csv file, i have created a flatfile schema from the file.csv converted from the excel file, then i have created a generated adapter items->consume adapter service obtaining a binding file for receive port and a schema with the result of a query from MS-SQL  that returns me 9 columns (finally doubling in csv file).

解决方案

For Issue 1: Try selecting all your rows and columns from your Excel worksheet and pasting them in notepad.  This should give you <tab> delimited data in your notepad file.  Select one of the <tab> characters and copy it (should be a single character between each field).  Then replace all the <tab> characters with a ',' using the Edit -> Replace menu (paste the copied <tab> character in the "Find what:" edit control).   When you run File -> Save As, make sure you select either Unicode or UTF-8 as your encoding.


这篇关于加倍生成CSV的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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