Issue with table processing using ',' as a separator

yann06

Новичок
Регистрация
16.12.2015
Сообщения
12
Благодарностей
2
Баллы
3
Hi everyone !
I'm working on a project where I need to download a zip file from Internet, decompress it and then do some filtering on it using table processing.
So when I start the script, the file does not exist yet.

The file contains ',' as a separator which I properly configured in my table (as well as the header) but when processing the file with "get line" and mapping a few columns to variables, the line is treated as one column only. I can see in the original file it is converted from 0,0,0,0,0 to "0,0,0,0,0" instead of "0","0","0","0","0"

If I modify the script to work with ';' as a separator and change the file to contain ';' instead of ',' then everything works perfectly.

I made a little sample project to illustrate this bug containing 2 zip files (one with .csv using ',' and the other one with .csv using ';') that are being decompressed and processed and should display some data

This is happening in ProjectMaker Lite version 5.9.8.0 and previous version (I did not try in ZP)

Thanks for your help !
 

Вложения

yann06

Новичок
Регистрация
16.12.2015
Сообщения
12
Благодарностей
2
Баллы
3
For now I modify the csv file with c# before processing to replace "," with ";" and it works well.
If anyone is interested in the c# code, here it is:

string csvPath = @"{-Project.Directory-}\file.csv";
string text = File.ReadAllText(csvPath);
text = text.Replace(",", ";");
File.WriteAllText(csvPath, text);
 
  • Спасибо
Реакции: shabbysquire

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Thanks for the c# code. I'm also experiencing major issues with table processing - both read/add info (ZP does the same thing to my files like yours).
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)