[PLUGIN] CSV, CSV2Array, CSV2Dictionary

Post your completed addons to share with the community

Post » Sat Jul 01, 2017 2:03 am

rexrainbow wrote:@alspal
Yes, here is the C3 version.
But it is not worked in current r42.2. All 3 party addons are not worked in r42.2.


Thank you!
B
149
S
75
G
20
Posts: 1,791
Reputation: 22,695

Post » Fri Aug 04, 2017 9:51 am

hi @rexrainbow

here is a question about cvs .
while the row name is chinese ,then csv won't work.

for example:
a b
c 1 2
d 3 4
like this ,cvs work perfect

but when
甲 乙
c 1 2
d 3 4

cvs can‘t work,i can't ge the value by (set text to cvs.At("甲","c")
maybe i miss something?
B
7
S
4
G
1
Posts: 5
Reputation: 1,190

Post » Fri Aug 04, 2017 10:26 am

@mobileshadow

It worked fine. For example, load csv string
",甲,乙
a,1,2
b,3,4"

then get 1 by csv.At("甲", "a")
B
108
S
26
G
271
Posts: 4,471
Reputation: 151,777

Post » Fri Aug 04, 2017 10:48 am

my english is poor ,excuse me to type chinese in english envirement.

rex大:
插件就是您的网站上下的,包括示例,我是在C2 的环境内直接改动了您的例子(下载于您的专区),然后用“甲乙”替代了“ac”,界面是excel界面,另存为csv格式。

然后发现无法获得表格参数,当我把“甲乙”改回“ac”的时候,就可以顺利取得表格参数了。

因此会疑惑是否是csv对中文的支持。

提问是因为无法确定是我操作中的某些步骤让csv无法支持中文,亦或是csv本身对中文支持。

自您的回答,应该是我的操作导致了格式转换中或许出现了问题,csv插件的中文支持是没问题的,是否可以烦扰您以丰富的经验帮我找下其中的问题。

致谢!
B
7
S
4
G
1
Posts: 5
Reputation: 1,190

Post » Fri Aug 04, 2017 3:08 pm

@mobileshadow

It might be encoding issue.
A possible solution is using my execel2csv to convert excel file to csv file, it worked fine with chinese characters.
B
108
S
26
G
271
Posts: 4,471
Reputation: 151,777

Post » Sun Aug 06, 2017 1:37 pm

by useing the excel2csv program, problem has been solved.

thanks.
B
7
S
4
G
1
Posts: 5
Reputation: 1,190

Post » Sun Aug 06, 2017 1:43 pm

mobileshadow wrote:my english is poor ,excuse me to type chinese in english envirement.

rex大:
插件就是您的网站上下的,包括示例,我是在C2 的环境内直接改动了您的例子(下载于您的专区),然后用“甲乙”替代了“ac”,界面是excel界面,另存为csv格式。

然后发现无法获得表格参数,当我把“甲乙”改回“ac”的时候,就可以顺利取得表格参数了。

因此会疑惑是否是csv对中文的支持。

提问是因为无法确定是我操作中的某些步骤让csv无法支持中文,亦或是csv本身对中文支持。

自您的回答,应该是我的操作导致了格式转换中或许出现了问题,csv插件的中文支持是没问题的,是否可以烦扰您以丰富的经验帮我找下其中的问题。

致谢!


Please remember that all posts must be in English or provide an English translation. as stipulated in the Forum
Rules
.

This is to ensure that all posts can be moderated and available for other users to search when having similar issues.

Thanks.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,414
Reputation: 59,512

Post » Mon Aug 07, 2017 12:48 pm

I get this error when i try to export CSV string
Image

I am loading contents into CSV plugin with Load table from JSON string -> Array.AsJSON
I also tried this with your example CAPX, so i guess i can't load Array into CSV, using Array.AsJSON expression.

Loading to CSV throught JSON string is also not working
Image
B
14
S
3
G
1
Posts: 95
Reputation: 1,015

Post » Mon Aug 07, 2017 3:23 pm

@ButcherZV
"CSV action: Load table from JSON string" only supports loading JSON from "CSV Expression:TableToString", not Array.AsJson
B
108
S
26
G
271
Posts: 4,471
Reputation: 151,777

Post » Mon Aug 07, 2017 4:10 pm

Is it possible to use this CSV plugin as array? I guess if i need to export my database as array, i will have to edit my project to use CSV instead of Array. I have looked at your examples, but i really can't figure this out, like why i have to name every colon and row?
B
14
S
3
G
1
Posts: 95
Reputation: 1,015

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 4 guests