File indexing completed on 2025-02-16 10:53:50

0001 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
0002 <html>
0003 <head>
0004    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
0005    <title>Calligra filters status: CSV FILTER</title>
0006 </head>
0007 <body text="#000000" bgcolor="#FFFFFF" link="#000099" vlink="#666666" alink="#666666">
0008 <A NAME="START">&nbsp;</A>
0009 
0010 <BR>
0011 <center>
0012  <h1>
0013   Calligra filters status: &nbsp;&nbsp;<i>CSV - Comma Separated Values</i>
0014  </h1>
0015 </center>
0016 
0017 <hr NOSHADE SIZE=2 WIDTH="70%">
0018 
0019 <font size="-1"><b>
0020  <A HREF="#import">Import</A> |
0021  <A HREF="#export">Export</A>
0022 </b></font>
0023 
0024 <BR><BR><BR>
0025 <center><a NAME="import"></a></center>
0026 
0027 <A HREF="#START"><font size="-1"><b>Up</b></font></A>
0028 <center>
0029 <table BORDER=0 CELLSPACING=0 BGCOLOR="#000000" WIDTH="100%">
0030  <tr>
0031   <td>
0032    <table BORDER=0 CELLPADDING=2 BGCOLOR="#FFFFFF"  WIDTH="100%">
0033 
0034     <tr BGCOLOR="#DDFFDD">
0035      <td COLSPAN="2">
0036       <center><b><i><font size="+1">
0037        <BR>
0038         Import CSV for KSpread<BR>
0039        <BR>
0040       </font></i></b></center>
0041      </td>
0042     </tr>
0043 
0044     <tr BGCOLOR="#EEEEFF">
0045      <td VALIGN=TOP WIDTH="1%" NOWRAP><b><font size="+1">Last update</font></b></td>
0046      <td>9 jan 2001</td>
0047     </tr>
0048 
0049     <tr BGCOLOR="#CCCCFF">
0050      <td VALIGN=TOP><b><font size="+1">Features</font></b></td>
0051      <td>- Can import CVS documents</td>
0052     </tr>
0053 
0054     <tr BGCOLOR="#EEEEFF">
0055      <td VALIGN=TOP><b><font size="+1">Todo</font></b></td>
0056      <td>
0057        - Automatically adjust the columns width to their contents.<BR>
0058        Will be difficult, as we don't know the font used...<BR>
0059        Solution ? Set a default font _in_ the filter, and use it to <BR>
0060        compute the width...
0061      </td>
0062     </tr>
0063 
0064     <tr BGCOLOR="#CCCCFF">
0065      <td VALIGN=TOP><b><font size="+1">History</font></b></td>
0066      <td>-</td>
0067     </tr>
0068 
0069     <tr BGCOLOR="#EEEEFF">
0070      <td VALIGN=TOP><b><font size="+1">Authors</font></b></td>
0071      <td>
0072       <A HREF="mailto:faure@kde.org">David Faure</A>&nbsp;&nbsp;
0073       <A HREF="mailto:trobin@kde.org">Werner Trobin</A>
0074      </td>
0075     </tr>
0076 
0077     <tr BGCOLOR="#CCCCFF">
0078      <td VALIGN=TOP><b><font size="+1">Links</font></b></td>
0079      <td>-</td>
0080     </tr>
0081 
0082     <tr BGCOLOR="#EEEEFF">
0083      <td VALIGN=TOP><b><font size="+1">Progress report </font></b></td>
0084      <td>
0085        <H2>Design</H2>
0086 <PRE>
0087 The CSV import filter uses a hand-made state machine to parse the CSV file.
0088 This allows to handle quoted fields (such as those containing the CSV delimiter),
0089 as well as the double-quote character itself (which then appears twice, and
0090 always in a quoted field).
0091 Just to make sure about the vocabulary, I call a quoted field a field
0092 starting with " and finishing with ".
0093 
0094 Let's try to draw the graph of the state machine using ascii-art.
0095 
0096 
0097          DEL or EOL
0098             /--\            
0099             |  |           
0100             |  v    &quot;     
0101        /--[START]-------->[QUOTED_FIELD] (**) 
0102   other|   ^   ^            |        ^ 
0103    (*) |   |   | DEL or     | &quot;      | &quot; (*) 
0104        |   |   | EOL        v        |           other 
0105        |   |   \----[MAYBE_END_OF_QUOTED_FIELD]--------> Error 
0106        |   |
0107        |   | DEL or
0108        |   | EOL
0109        v   |
0110    [NORMAL_FIELD] (**)
0111 
0112 DEL  : CSV delimiter (depends on locale !). Often comma, sometimes semicolon.
0113 EOL  : End Of Line.
0114 (*)  : added to the current field
0115 (**) : implicit loop on itself, labeled &quot;other (*)&quot;
0116 
0117 
0118 Ugly isn't it ? :) One can't be good in drawings AND in hacking :)
0119 
0120 That's all. For the rest, see csvfilter.cc
0121 
0122 David Faure &lt;faure@kde.org&gt;, 1999 
0123 </PRE> 
0124      </td>
0125     </tr>
0126    </table>
0127   </td>
0128  </tr>
0129 </table>
0130 </center>
0131 <A HREF="#START"><font size="-1"><b>Up</b></font></A>
0132 
0133 <br><br><br>
0134 
0135 <hr NOSHADE SIZE=1>
0136 <br><br><br>
0137 
0138 
0139 <center>
0140  <a NAME="export"></a>
0141 </center>
0142 
0143 <A HREF="#START"><font size="-1"><b>Up</b></font></A>
0144 <center>
0145 <table BORDER=0 CELLSPACING=0 BGCOLOR="#000000"  WIDTH="100%">
0146  <tr>
0147   <td>
0148    <table BORDER=0 CELLPADDING=2 BGCOLOR="#FFFFFF"  WIDTH="100%">
0149     <tr BGCOLOR="#FFDDDD">
0150      <td COLSPAN="2">
0151       <center><b><i><font size="+1">
0152        <BR>Export KSpread to CSV<BR><BR>
0153       </font></i></b></center>
0154      </td>
0155     </tr>
0156 
0157     <tr BGCOLOR="#EEEEFF">
0158      <td VALIGN=TOP WIDTH="1%" NOWRAP><b><font size="+1">Last update</font></b></td>
0159      <td>?</td>
0160     </tr>
0161 
0162     <tr BGCOLOR="#CCCCFF">
0163      <td VALIGN=TOP><b><font size="+1">Features</font></b></td>
0164      <td>?</td>
0165     </tr>
0166 
0167     <tr BGCOLOR="#EEEEFF">
0168      <td VALIGN=TOP><b><font size="+1">Todo</font></b></td>
0169      <td>?</td>
0170     </tr>
0171 
0172     <tr BGCOLOR="#CCCCFF">
0173      <td VALIGN=TOP><b><font size="+1">History</font></b></td>
0174      <td>-</td>
0175     </tr>
0176 
0177     <tr BGCOLOR="#EEEEFF">
0178      <td VALIGN=TOP><b><font size="+1">Authors</font></b></td>
0179      <td>
0180       <A HREF="mailto:faure@kde.org">David Faure</A>&nbsp;&nbsp;
0181       <A HREF="mailto:trobin@kde.org">Werner Trobin</A>
0182      </td>
0183     </tr>
0184 
0185     <tr BGCOLOR="#CCCCFF">
0186      <td VALIGN=TOP><b><font size="+1">Links</font></b></td>
0187      <td>-</td>
0188     </tr>
0189 
0190     <tr BGCOLOR="#EEEEFF">
0191      <td VALIGN=TOP><b><font size="+1">Progress report </font></b></td>
0192      <td>---</td>
0193     </tr>
0194    </table>
0195   </td>
0196  </tr>
0197 </table>
0198 </center>
0199 <A HREF="#START"><font size="-1"><b>Up</b></font></A>
0200 
0201 </body>
0202 </html>