Hi Philip, Your xls interface functions work quite well. I just today realized that using the COM interface one can not only write text and numbers, but also formulas and these are recognized as such by excel.
I gave the POI interface a try attached a patch which enables this
feature also there.
This may not be a really nice implementation, but it boils down to
*) a string starting with "=" is interpreted as formula (like in the COM
interface)
*) the "=" character is stripped off
*) the corresponding formula text written using SetCellFormula
Works for me using this simple test code and excel 2003:
xls = xlsopen("foo.xls", 1, "POI");
xls = oct2xls({1;2;3}, xls, 1, "A1");
xls = oct2xls({"=SUM(A1:A3)"}, xls, 1, "B3");
xlsclose(xls);
Caveats:
the POI interface appears to be english only, whereas the COM interface
seems to use the installed excel's language only.
I also gave the JXL interface a try but I am getting the error
> xls = oct2xls({"=SUM(A1:A3)"}, xls, 1, "B3");
error: [java] java.lang.NoSuchMethodException: createWorkbook
error: called from:
error: C:\Octave\3.2.4_gcc-4.4.0\share\octave\packages\io-1.0.11\oct2xls.m at
line 556, column 6
error: C:\Octave\3.2.4_gcc-4.4.0\share\octave\packages\io-1.0.11\oct2xls.m at
line 94, column 17
I did't delve into this any further yet.
benjamin
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
oct2xls_poi_formula.patch
Description: Binary data
------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________ Octave-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/octave-dev
