httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yerika Bustamante Aparicio" <yeri...@hotmail.com>
Subject [users@httpd] How do i make a chart in excel using Module OLE??'
Date Fri, 21 Mar 2003 19:33:16 GMT
<html><div style='background-color:'><DIV></DIV>
<DIV></DIV>
<P>Hi, i used this program but occur a error, my program is:<BR>my $Excel = Win32::OLE-&gt;new("Excel.Application",'Quit');<BR>$Excel-&gt;{Visible}=0;</P>
<P>my $Book = $Excel-&gt;Workbooks-&gt;Add;<BR>my $Sheet = $Book-&gt;Worksheets(1);<BR>$Sheet-&gt;{Name}
= 'muestra';<BR>my $Filename = 'c:\\archivos de<BR>programa\\apache2\\prueba\\prueba.xls';</P>
<P>$dbh=DBI-&gt;connect("dbi:Oracle:PPP","TTTT","****",{AutoCommit=&gt;0})<BR>or
die "No puede conectarse en: $!";<BR>$sth=$dbh-&gt;prepare("select data1,data2 from
tablaX<BR>where&nbsp; data3&gt;to_date('01/02/03','dd/mm/yy') and<BR>data1&gt;5000
and data1&lt;1000000 order by(data3)") or die<BR>"$DBI::errstr";<BR>$sth-&gt;execute()
or die "No puede ejecutar sth:<BR>$DBI::errstr.";<BR>$sth-&gt;bind_columns(\$col1,\$col2);<BR>while($sth
-&gt; fetchrow)<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp; $rv = $sth-&gt;rows;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>&nbsp;&nbsp;&nbsp;&nbsp; my $Range = $Sheet-&gt;Range("A2:B$rv");<BR>&nbsp;&nbsp;&nbsp;&nbsp;
$Range-&gt;{Value} = $col1,$col2;<BR>}</P>
<P>my $Chart = $Book-&gt;charts-&gt;Add;<BR>$Chart-&gt;{ChartType}
= x|StockOHLC;<BR>$Chart-&gt;Location (xlLocationAsNewSheet, $name<BR>-&gt;{muestra});&nbsp;&nbsp;&nbsp;
<BR>$Chart-&gt;SetSourceData({Source =&gt; $Range, PlotBy =&gt;<BR>xlColumns});<BR>$Chart-&gt;{HasTitle}
= 1;<BR>$Chart-&gt;PlotArea-&gt;Border-&gt;{LineStyle} = xlContinuous; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<BR>$Book-&gt;SaveAs($Filename);<BR>$Book-&gt;Close;<BR>but when
i run the program don´t generate the graphic,</P>
<P>i can´t generate the graphic, the results are two<BR>columns of 10 rows but
the single graphic generates it<BR>with the first row and it repeats 10 times, as I
can<BR>solve this problem.<BR>Excuse by the grammar but i don´t speak english.<BR>Thanks
for your help, i need it.<BR><FONT face="Verdana, Geneva, Arial, Sans-serif"><EM>Yerika</EM></FONT></P>

<DIV></DIV></div><br clear=all><hr>  </html>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message