Silly, fun and useful things to do with Resolver One
  • HOME
  • About
  • Articles
  • Fun
  • Snippets
  • Disclaimer
  • Useful Links

Site by Voidspace

Email Michael

Download Resolver One

RSS Feed RSS Feed

Resolver Hacks contains information and code for doing fun and useful things with Resolver One. This site is created and maintained by Michael Foord, not by Resolver Systems. Please read the disclaimer before using any of the code on this site.

Site Built with rest2web

Creative Commons License

IronPython Wiki

IronPython in Action IronPython in Action

Fragments and Snippets

This page contains snippets of code that I've found useful whilst creating Resolver spreadsheets.

The Code

  • Accessing Files with __file__

    The __file__ variable provides a convenient way to access files stored relative to the directory your spreadsheet is in. This snippet shows you how to use it.

  • Coloring Alternate Rows

    Apparently, when you have a grid of data, wanting to color alternate rows differently is common. It makes it easier to read, or something like that. As always this is easy to do in Resolver.

  • Easy Cell Ranges

    CellRanges are enormously handy when it comes to using or presenting blocks of data. Here are a couple of functions that make creating and adding borders to them even easier.

  • Import with Reload

    The best way to use code shared between several spreadsheets is to develop it as a Python module. This function reloads modules every time a spreadsheet is recalculated, so that you can pick up the latest version of your code whilst you are testing it inside a spreadsheet.

  • Spreadsheet Module Directory

    Keeping spreadsheet modules in the same directory as your spreadsheets can be a nuisance. Using the IRONPYTHONPATH environment variable you can keep all your modules in a single directory and still import them in your spreadsheets.

  • A Button on the Grid

    Placing buttons on the grid is a useful way of building functionality into your spreadsheets. This snippet shows how to do it, using a recalculate button as an example.

  • The Main Module

    A hack showing you how to access the main spreadsheet namespace (and objects) from inside module code.

  • Virtual Worksheets

    Virtual worksheets are worksheets that only exist in code, and are not shown in the grid. This technique allows you to create 'scratchpad' worksheets, for storing intermediate values, without exposing them to the user. Once created we can use a CellRange and the CopyRange function to copy interesting data back to a visible worksheet.

 


Hosted by Webfaction

Return to Top

Last edited Mon Jun 11 23:10:20 2007.

Copyright ©2007 Michael Foord. All rights reserved. Design by Elemental Works. Logo by FuchsiaShock. Valid XHTML & CSS.

This work is licensed under a Creative Commons License.