<?xml version="1.0" encoding="windows-1252"?>
<node id="636591" title="Re: CSV to Excel (where I keep the excel formula)" created="2007-09-02 06:08:13" updated="2007-09-02 02:08:13">
<type id="11">
note</type>
<author id="123953">
strat</author>
<data>
<field name="doctext">
&lt;p&gt;if you want to do it with a one-liner (or look at the code to do it in a program), get excelPerl from [636590|ExcelPerl 0.12 released] and try something like


&lt;p&gt;&lt;b&gt;Update:&lt;/b&gt; Sorry, I misread you. The code for ExcelPerl would be (if your col is number 2):&lt;/p&gt;
&lt;code&gt;
excelPerl.pl -ane "$C-&gt;[2]-&gt;{FormulaLocal} .= '+99'" -f test.xls
&lt;/code&gt;
&lt;p&gt;If you have got a headline in the first row, just skip it with the additional parameter -h=1&lt;/p&gt;


&lt;p&gt;Code to convert excel to csv with formulas (doesn't match the question):&lt;/p&gt;
&lt;code&gt;
perl excelPerl.pl -begin "use Text::CSV_XS; $csv = Text::CSV_XS-&gt;new( { binary =&gt; 1 } )" -ane "$csv-&gt;combine( map { $_-&gt;{FormulaLocal} } @C); print $csv-&gt;string, $/" -f test.xls
&lt;/code&gt;
&lt;p&gt;which produces something like&lt;/p&gt;
&lt;code&gt;
a,b,a+b
1,4,=A2+B2
2,5,=A3+B3
3,2,=A4+B4
4,1,=A5+B5
5,5,=A6+B6
&lt;/code&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-123953"&gt;
&lt;P&gt;
Best regards,&lt;BR&gt;
perl -e "s&gt;&gt;*F&gt;e=&gt;y)\*martinF)stronat)=&gt;print,print v8.8.8.32.11.32"
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
636555</field>
<field name="parent_node">
636555</field>
</data>
</node>
