February 16, 2019

The StartX Files: Between the Sheets With abs - page 2

IF Crew = Dave THEN DoorPosition = Close

  • December 7, 2001
  • By Brian Proffitt

One good example of a good Linux tool is the abs spreadsheet application. I should be specific here and mention that in actuality, abs was originally written for UNIX and, like many X apps, abs has neatly made the jump over to our neck of the woods.

abs is a freely available download maintained by programmer Andr� Bertin. The current version is 0.907, which is available as a binary for Linux. Earlier versions are available for AIX, HP-UX, and IRIX in binary form. The source, it goes without saying, is also available for this GPL application, both for 0.907 and 0.908. Given my preference for binaries, I pulled the 0.907 for Linux file down and installed it onto my SuSE 7.3 box, using the instructions provided on the abs Web site.

This may seem like a very minor thing, but I have learned that not all tarballs with binaries in them should be treated the same way, and it's a polite development team that spells it out for the newbies among us.

After installation, I started abs on my KDE desktop and was awarded with a frozen splash screen, which was initially off-putting. I restarted KDE and from then on, everything worked fine. I'll chalk this one down to post-installation jitters--that nebulous pseudo-technical frame of time where all programs are given a temporary free pass to act a little hinky. But only once.

The first thing you will say to yourself after starting abs (or looking at the screenshot with this article) is "Oh. Motif." since that is what the interface appears to be built upon. Actually, its based on Xaw, which has a very Motif-like look. This was certainly intentional, since Bertin first developed abs in Motif for AIX back in 1996.

Although Xaw/Motif are aesthetically not my favorite widget kits, the overall look of abs was satisfactory. I did notice that there were some mouse tracking delays within the dialog boxes under KDE, which did not happen under GNOME. These delays were slightly more than negligible, so for better performance I would recommend working with this under GNOME, if you are inclined to use a desktop environment.

In terms of functionality, all of the standard spreadsheet accouterments were in place: input line, function bar, row and column controls... pretty much everything you need to manipulate your data in the cells and sheets. The only thing missing that I would have liked to have seen was a pop-up context menu for the row and column control buttons. In abs, you have to select the row or column then go all the way up to the main menus to implement a command like formatting. Picky, but time-consuming after a while.

Printing is not a difficult thing to master, as abs workbooks are converted to XFig format and then sent to the printer in that format. You need to make sure you have fig2dev if you want to send information to the printer in PostScript format.

abs does a good job letting you enter functions into individual cells without having to type a thing, if you are willing. Just click on the Function tool, pick a function, and then choose the cells you want to be entered in the function to have their cell addresses automatically entered. The only thing you need enter manually are parentheses and brackets, if you need them. There are 144 functions included, so there's no shortage of calculations to implement.

Chart creation is a wee bit convoluted, depending on how you start it. If you have a range of cells selected, then selecting Chart|Create will immediately slap up an XY chart, which can be moved and resized around the sheet with ease. Of course, this is all well and good unless you wanted another kind of chart. In this case, or if you don't have a range selected, you will have to use the Chart|Create menu commands and then Chart|Change Chart to pick a range and/or chart type. You can select from XY, pie, and bar charts, using a dialog box that is very reminiscent of Excel's chart tool. Again, this quirk is not a deal-breaker, just a little quirk that you will have to adapt to.

Speaking of Excel, abs does provide a certain kind of compatibility with Excel, using a unique tool patterned directly after Visual Basic: the ABVisual scripting language.

Bertin's approach to sharing Excel and abs files is rather interesting. The contents of every abs file, he explained, is an ABVisual script that is faithfully recreated by abs when the spreadsheet file is opened in abs.

"If you open in an editor the file saved by abs," Bertin said, "you will find something like:

Sub main() Cells(1,1).formula = "Welcome to the abs spreadsheet"
Cells(2,1).formula = "=10+10" Cells(2,1).font.size = 18 ...  End sub

"When you open this file inside abs," he continued, "abs will execute the macro called main to recreate the spreadsheet. Inside Excel, you just have to import the file inside Visual Basic, run the main routine and the result is exactly the same."

To reverse the process and pull Excel data into abs, Bertin has written a simple Excel macro to save the content of the workbook in the abs file/script format.

Granted, this is a bit cumbersome, but it works. I was able to open files of either type with impunity in either application. Some of the fancier formatted Excel workbooks looked a bit weird in abs, but this was mostly due to font-handling differences between Windows and X.

As far as other spreadsheet formats are concerned, users might be a bit out of luck for now, as Bertin has concentrated his efforts on just Excel compatibility for now.

The ABVisual scripting language is one of the big strengths of abs, since it does far more than provide Excel compatibility. According to Bertin, "[ABVisual scripts] can be compiled as stand-alone applications and you can easily add your own classes to the object model."

Bertin has created this scripting language from the ground up, with the lexical analyzer generated by Lex (Flex) and the grammar interpreted by Yacc or
Bison. His biggest problem was "creating ABVisual to be compatible with Visual Basic from Microsoft, [since] there is no well defined grammar of this language."

Looking Ahead

Now that abs is at version 0.907, Bertin feels confident that that spreadsheet functionality of the application is stable enough for him to start working on the ABVisual part of the app. Part of this is a desire to improve the script, but it also stems from a desire to keep the spreadsheet as simple as he can.

"A debug tool is needed, more information about syntax errors is needed, and documentation about the object model and implemented functions is needed," Bertin stated.

Before version 1.0, Bertin also wants to implement a full batch mode, to accommodate those times when multiple instances of abs will help generate/process data for a large or multiple reports.

Bertin has a lot of work ahead, as he is the sole developer on the abs project (though he indicated he gets a lot of help from user bug reports).

Overall, I found abs to be a solid and fast spreadsheet that can be used for simple to fairly complex spreadsheet needs. It's nothing fancy, but it definitely gets the job done, which is something we all can appreciate.

Available from: http://www.ping.be/bertin/abs.shtml
Version reviewed: 0.907 for Linux/Intel
License: GNU General Public License
Cost: Free to download as binary or source

Most Popular LinuxPlanet Stories