Skip to content

Commit 38bb3a4

Browse files
committed
Document limitations on CSV import
1 parent f9bddf8 commit 38bb3a4

File tree

2 files changed

+40
-5
lines changed

2 files changed

+40
-5
lines changed

Modelica/Blocks/Sources.mo

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1840,7 +1840,7 @@ fileName is \"NoName\" or has only blanks.
18401840
</pre></blockquote></li>
18411841
<li><strong>Read</strong> from a <strong>file</strong> \"fileName\" where the matrix is stored as
18421842
\"tableName\". CSV, text and MATLAB MAT-file format is possible.
1843-
(The text format is described below).
1843+
(Both the limitations on the CSV format and the text format are described below).
18441844
The MAT-file format comes in four different versions: v4, v6, v7 and v7.3.
18451845
The library supports at least v4, v6 and v7 whereas v7.3 is optional.
18461846
It is most convenient to generate the MAT-file from FreeMat or MATLAB&reg;
@@ -1865,6 +1865,13 @@ When the constant \"NO_FILE_SYSTEM\" is defined, all file I/O related parts of t
18651865
source code are removed by the C-preprocessor, such that no access to files takes place.
18661866
</p>
18671867
<p>
1868+
If the table is read from a CSV file, the following limitations apply
1869+
</p>
1870+
<ol>
1871+
<li>Non-numeric data is not supported (in the lines following the header lines), even if such columns are excluded.</li>
1872+
<li>Double-quoted data entries in the first header line shall not contain the column delimiter.</li>
1873+
</ol>
1874+
<p>
18681875
If tables are read from a text file, the file needs to have the
18691876
following structure (\"-----\" is not part of the file content):
18701877
</p>

Modelica/Blocks/Tables.mo

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ fileName is \"NoName\" or has only blanks.
175175
</pre></blockquote></li>
176176
<li><strong>Read</strong> from a <strong>file</strong> \"fileName\" where the matrix is stored as
177177
\"tableName\". CSV, text and MATLAB MAT-file format is possible.
178-
(The text format is described below).
178+
(Both the limitations on the CSV format and the text format are described below).
179179
The MAT-file format comes in four different versions: v4, v6, v7 and v7.3.
180180
The library supports at least v4, v6 and v7 whereas v7.3 is optional.
181181
It is most convenient to generate the MAT-file from FreeMat or MATLAB&reg;
@@ -202,6 +202,13 @@ When the constant \"NO_FILE_SYSTEM\" is defined, all file I/O related parts of t
202202
source code are removed by the C-preprocessor, such that no access to files takes place.
203203
</p>
204204
<p>
205+
If the table is read from a CSV file, the following limitations apply
206+
</p>
207+
<ol>
208+
<li>Non-numeric data is not supported (in the lines following the header lines), even if such columns are excluded.</li>
209+
<li>Double-quoted data entries in the first header line shall not contain the column delimiter.</li>
210+
</ol>
211+
<p>
205212
If tables are read from a text file, the file needs to have the
206213
following structure (\"-----\" is not part of the file content):
207214
</p>
@@ -439,7 +446,7 @@ fileName is \"NoName\" or has only blanks.
439446
</pre></blockquote></li>
440447
<li><strong>Read</strong> from a <strong>file</strong> \"fileName\" where the matrix is stored as
441448
\"tableName\". CSV, text and MATLAB MAT-file format is possible.
442-
(The text format is described below).
449+
(Both the limitations on the CSV format and the text format are described below).
443450
The MAT-file format comes in four different versions: v4, v6, v7 and v7.3.
444451
The library supports at least v4, v6 and v7 whereas v7.3 is optional.
445452
It is most convenient to generate the MAT-file from FreeMat or MATLAB&reg;
@@ -466,6 +473,13 @@ When the constant \"NO_FILE_SYSTEM\" is defined, all file I/O related parts of t
466473
source code are removed by the C-preprocessor, such that no access to files takes place.
467474
</p>
468475
<p>
476+
If the table is read from a CSV file, the following limitations apply
477+
</p>
478+
<ol>
479+
<li>Non-numeric data is not supported (in the lines following the header lines), even if such columns are excluded.</li>
480+
<li>Double-quoted data entries in the first header line shall not contain the column delimiter.</li>
481+
</ol>
482+
<p>
469483
If tables are read from a text file, the file needs to have the
470484
following structure (\"-----\" is not part of the file content):
471485
</p>
@@ -640,7 +654,7 @@ fileName is \"NoName\" or has only blanks.
640654
</pre></blockquote></li>
641655
<li><strong>Read</strong> from a <strong>file</strong> \"fileName\" where the matrix is stored as
642656
\"tableName\". CSV, text and MATLAB MAT-file format is possible.
643-
(The text format is described below).
657+
(Both the limitations on the CSV format and the text format are described below).
644658
The MAT-file format comes in four different versions: v4, v6, v7 and v7.3.
645659
The library supports at least v4, v6 and v7 whereas v7.3 is optional.
646660
It is most convenient to generate the MAT-file from FreeMat or MATLAB&reg;
@@ -667,6 +681,13 @@ When the constant \"NO_FILE_SYSTEM\" is defined, all file I/O related parts of t
667681
source code are removed by the C-preprocessor, such that no access to files takes place.
668682
</p>
669683
<p>
684+
If the table is read from a CSV file, the following limitations apply
685+
</p>
686+
<ol>
687+
<li>Non-numeric data is not supported (in the lines following the header lines).</li>
688+
<li>Double-quoted data entries in the first header line shall not contain the column delimiter.</li>
689+
</ol>
690+
<p>
670691
If tables are read from a text file, the file needs to have the
671692
following structure (\"-----\" is not part of the file content):
672693
</p>
@@ -831,7 +852,7 @@ fileName is \"NoName\" or has only blanks.
831852
</pre></blockquote></li>
832853
<li><strong>Read</strong> from a <strong>file</strong> \"fileName\" where the matrix is stored as
833854
\"tableName\". CSV, text and MATLAB MAT-file format is possible.
834-
(The text format is described below).
855+
(Both the limitations on the CSV format and the text format are described below).
835856
The MAT-file format comes in four different versions: v4, v6, v7 and v7.3.
836857
The library supports at least v4, v6 and v7 whereas v7.3 is optional.
837858
It is most convenient to generate the MAT-file from FreeMat or MATLAB&reg;
@@ -858,6 +879,13 @@ When the constant \"NO_FILE_SYSTEM\" is defined, all file I/O related parts of t
858879
source code are removed by the C-preprocessor, such that no access to files takes place.
859880
</p>
860881
<p>
882+
If the table is read from a CSV file, the following limitations apply
883+
</p>
884+
<ol>
885+
<li>Non-numeric data is not supported (in the lines following the header lines).</li>
886+
<li>Double-quoted data entries in the first header line shall not contain the column delimiter.</li>
887+
</ol>
888+
<p>
861889
If tables are read from a text file, the file needs to have the
862890
following structure (\"-----\" is not part of the file content):
863891
</p>

0 commit comments

Comments
 (0)