41
Views
1
Comments
[CSVUtil] "IsIgnoreColumnChange" property seems not working
csvutil
Service icon
Forge asset by Wei Zhu
Application Type
Reactive
Service Studio Version
11.54.37 (Build 63002)
Platform Version
11.25.0 (Build 41684)

Hi, I'm making an app to import some CSV files.

The file format needs to be validated, so I'd like to check if the file has correct number of columns at first.

"LoadCSV2RecordList" has an input parameter named "IsIgnoreColumnChange", and as per my understanding, if this parameter is set to False (not ignore), input file will be checked if the input file has same number of column as the structure given in "RecordList" input parameter.

So, if file like this is being imported:

Aston, 25, 612

Ronald, 32, 619

Walter, 41

---

If expected structure is (name, age, room),
3rd row has fewer number of columns (missing room number column) and raise an error or output false in "IsSuccess" Output parameter.

However, it does not raise exception and always output true on "IsSucess", no matter if I set "IsIgnore..." as true or false.

So, my question is how is this input parameter supposed to work?

Thanks in advance.

2021-06-21 12-37-59
Wei Zhu

Hi Endo-San

When IsIgnoreColumnChange is set to false, CSVUtil will check # of columns.
And if # of columns is not same as the first data line, it will return false.

According to your structure and CSV, it should return false when parse third line.
Could you please provide OML and CSV file, so we can check are there any other reasons.

Regards
Wei

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.