Strings in gnumeric: implementing a gawk pipeline



Hello!

Gnumeric, as well as other spreadsheet applications (like OOo Calc) have unfortunately a very limited support for string operations. One issue where gnumeric continues to copy the bad quirks of MS Office is the string search/find function.

When the string is NOT found, instead of reporting a value of 0 (or -1), gnumeric reports an ERROR (#VALUE), thus breaking any further operations dependent on this result. [I have posted a similar feature request for OOo Calc, see issue 66590 (http://qa.openoffice.org/issues/show_bug.cgi?id=66590) for a detailed description.]

Being employed in the life sciences, I work extensively with strings, needing often complex string operations. Unfortunately, there is no easy way to work with strings in gnumeric (nor in OOo Calc or Excel).

Should advanced string functions be implemented in Calc?
While some may argue that this is the ultimate solution, powerful alternatives do exist.

GAWK
=====
It is not always necessary to reinvent the wheel. We may sometimes need a square wheel, but most often the time proven round wheel is far better. There is fortunately an open source program that greatly eases the work with strings.

Gawk (awk) is available both for Unix and Windows (see project gnuwin32 on sourceforge.net). Also, the structure of spreadsheets (rows and cells) seems particularly suitable for use with gawk. For the full description of this issue, see http://qa.openoffice.org/issues/show_bug.cgi?id=66816 .

What I really want is an easy way to run gawk scripts within gnumeric, i.e.:
- gnumeric should open a bidirectional pipeline to gawk (gawk supports this)
- (advanced: when macros will be implemented => gnumeric should recognize the shebang line (e.g. #!gawk -parameters...), and use the correct program, in this case gawk, for the particular script)

ADVANTAGES
============
- there are countless awk/gawk scripts (no need to rewrite everything)
- it is possible to write in a very short time (minutes) a gawk script to solve a particular problem
- it is possible to automate many tasks (by scripting)
- even complex problems can be solved easily
- gawk is maintained separately, NO need to code complex string functions within gnumeric



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]