<div dir="ltr">hi,<div>I am reading a file with text and numbers and want to rewrite it with a format i am using this program but it is not working </div><div>==</div><div>
<p class="gmail-p1"><span class="gmail-s1">lines = asciiread("stat_station.csv",-1,"string")</span></p>
<p class="gmail-p1"><span class="gmail-s1">nom = str_get_field(lines(0:),1,",")</span></p>
<p class="gmail-p1"><span class="gmail-s1">idis=stringtofloat(str_get_field(lines(0:),2,","))</span></p>
<p class="gmail-p1"><span class="gmail-s1">lon=stringtofloat(str_get_field(lines(0:),3,","))</span></p>
<p class="gmail-p1"><span class="gmail-s1">lat=stringtofloat(str_get_field(lines(0:),4,","))</span></p>
<p class="gmail-p2">write_table("dat1.txt", "w", alist1, "%s %2.0f %5.1f %5.1f ")<br><span class="gmail-s1"></span></p><p class="gmail-p1"><span class="gmail-s1">==</span></p><p class="gmail-p1"><span class="gmail-s1">any help</span></p><p class="gmail-p1"><span class="gmail-s1">I want to rewrite to this output format :</span></p><p class="gmail-p1"><span class="gmail-s1">
</span></p><table border="0" cellpadding="0" cellspacing="0" width="348" style="border-collapse:collapse;width:260pt">
<colgroup><col width="87" span="4" style="width:65pt">
</colgroup><tbody><tr height="21" style="height:16pt">
<td height="21" width="87" style="height:16pt;width:65pt">BAKEL</td>
<td align="right" width="87" style="width:65pt">1</td>
<td align="right" width="87" style="width:65pt">-12.46666</td>
<td align="right" width="87" style="width:65pt">14.9</td>
</tr>
<tr height="21" style="height:16pt">
<td height="21" style="height:16pt">BAMBEY</td>
<td align="right">-1</td>
<td align="right">-16.46666</td>
<td align="right">14.7</td>
</tr>
<tr height="21" style="height:16pt">
<td height="21" style="height:16pt"><br></td><td align="right"></td><td align="right"></td><td align="right"></td></tr></tbody></table></div></div>