The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
Problem with CSVExampleSource
Hi,
I have no problem when loading the data of the following table with Excel:
However, after saving this table with CSVExampleSetWriter and loading the file with CSVExampleSource RM complains the line 3 (and 4): "Number of columns in line 3 was unexpected, was: 5, expected: 4". I guess it's due to the character combination ...\" in the csv-file.
Due to the very huge size of my original database file I cannot open it and replace the string \" with another combination. How can I handle this problem??
I'm using RM 4.6 on WindowsXP machine.
<operator name="Root" class="Process" expanded="yes">
<operator name="ExcelExampleSource" class="ExcelExampleSource" breakpoints="after">
<parameter key="excel_file" value="test.xls"/>
<parameter key="first_row_as_names" value="true"/>
</operator>
<operator name="CSVExampleSetWriter" class="CSVExampleSetWriter">
<parameter key="csv_file" value="test.csv"/>
</operator>
<operator name="CSVExampleSource" class="CSVExampleSource">
<parameter key="filename" value="test.csv"/>
</operator>
</operator>
Thanks for your help and Best Regards
VD
I have no problem when loading the data of the following table with Excel:
1 XXXX XX\\XX XXXX XXXX 2 XXXX XXXX XXXX XXXX 3 XXXX XXXX\ XXXX XXXX 4 XXXX XXXX\ XXXX XXXX 5 XXXX XX\\XX XXXX XXXX 6 XXXX XX\\XX XXXX XXXX |
Due to the very huge size of my original database file I cannot open it and replace the string \" with another combination. How can I handle this problem??
I'm using RM 4.6 on WindowsXP machine.
<operator name="Root" class="Process" expanded="yes">
<operator name="ExcelExampleSource" class="ExcelExampleSource" breakpoints="after">
<parameter key="excel_file" value="test.xls"/>
<parameter key="first_row_as_names" value="true"/>
</operator>
<operator name="CSVExampleSetWriter" class="CSVExampleSetWriter">
<parameter key="csv_file" value="test.csv"/>
</operator>
<operator name="CSVExampleSource" class="CSVExampleSource">
<parameter key="filename" value="test.csv"/>
</operator>
</operator>
Thanks for your help and Best Regards
VD
0
Answers
You're right, the single backslash "escapes" the following character, which in the problem lines is a space, ....which is also meant to be a separator. All quite annoyingly logical. It's not a problem to flip '\' to '/', like this...
Wow - Thanks!!
Best Regards
VD