You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Jon Svede <js...@yahoo.com> on 2011/05/06 15:32:11 UTC
interactive shell for Excel/POI
Is there a tool that will allow you to interact with a spreadsheet from a
shell? I am thinking of something where I can evaluate cells interactively, set
values, drill into dependencies, etc. I am thinking of something like this:
shell> open c:/some/excel/file.xls
shell> get 'sheet1'!$B$12
value: 12.0
shell> set 'sheet1'!$B$12 15.0
value: 15.0
shell> evaluate 'sheet1'!$B15
evaluates to: 30.0
shell> expose 'sheet'!$B$15
cell: 30.0 = B12*2
I am sure there are other things that could be done. We have something like
this now, a tool we wrote, that will allow us to drill into a cell and follow
it's dependencies - the goal being to find places where POI's evaluation differs
from Excel so we can fix the spreadsheet (because I am certain I trust POI more
than Excel). This tool is only a read-only tool, so I can't set values, I can
only drill into the dependency tree.
Has anyone seen anything like this?
Thanks,
Jon
Re: interactive shell for Excel/POI
Posted by Jon Svede <js...@yahoo.com>.
Thanks, Mark!
The thing that I think all the suggestions have in common is that they all try
to leverage existing CLI type interfaces - which to me implies using that shell
as my vehicle to achieve my goal. This is good on the one hand - using stuff
that exists today - but it comes with whatever other stuff is in that shell that
might be beyond my need.
While I don't plan to create a domain specific language around this, my goal is
similar. I'm basically taking the ExcelAnt idea a step further in terms of
laziness: I want to be able to test a sheet or workbook for compatibility,
interactively. I think this is probably a step lazier than ExcelAnt because it
requires even less work - I just fire up the shell and start testing; when I
find a discrepancy I can drill into it right there. ExcelAnt is for re-useable
testing. This shell will be a small set of commands to quickly establish
compatibility (though the debugging/breakpoint idea isn't all that simple).
Another requirement for me, and this was true of the ant tasks too, is that I
want to be able to give this to an Excel developer (in my case these people
aren't programmers, they're analysts) and with a 5 minute explanation get them
up to speed. This is probably my biggest useability requirement: giving it to a
non-technical, non-programmer and have it be useable.
I am basically creating tooling that let's me and my team off load the work of
validating that a spreadsheet is POI compatible to the spreadsheet developers.
However, I also want a tool let's me drill into problems rather than what I have
to do now, which is sort of manually walk thru the sheets looking for places
where Excel and POI and disagree.
I need to look more closely at the suggestions before I go off and writing
something.....
Jon
________________________________
From: Mark Fortner <ph...@gmail.com>
To: POI Users List <us...@poi.apache.org>
Sent: Sun, May 15, 2011 2:06:12 PM
Subject: Re: interactive shell for Excel/POI
A couple of other alternatives occurred to me:
1. Java shipped with a scripting shell in 1.5. The default language is
JavaScript, and the tool is called jrunscript. It can also be used with
other scripting languages. You can find a complete list of the supported
languages at http://scripting.dev.java.net
2. Groovy has it's own interactive shell, and you can use the @Grab
annotation (aka Grape) to load any library. I typically use this to load
Maven-based libraries. You can find out more information about these
technologies here:
- http://groovy.codehaus.org/Groovy+Shell
- http://groovy.codehaus.org/Grape
Hope this helps,
Mark
On Sun, May 15, 2011 at 12:54 PM, Jon Svede <js...@yahoo.com> wrote:
> Sorry for the late reply, I read this last week and have been thinking
about it.
>
> I don't know if either of those would address my desire. I hadn't heard
of
> Rhino, I'll have to look at it in detail. At a quick glance it looks
pretty
> programmer oriented and I wanted to get a little further away from what
looks
> like actual code (though I think one could say that any CLI is pretty
programmer
> oriented).
>
> Not sure how I would use the Ruby extension, especially one that isn't in
the
> API already(is that in the works? I haven't seen any posts on that
recently).
>
> Thanks,
>
> Jon
>
>
>
> ________________________________
> From: Nick Burch <ni...@alfresco.com>
> To: POI Users List <us...@poi.apache.org>
> Sent: Fri, May 6, 2011 10:17:06 PM
> Subject: Re: interactive shell for Excel/POI
>
> On Fri, 6 May 2011, Jon Svede wrote:
>> Is there a tool that will allow you to interact with a spreadsheet from a
>>shell?
>
> Two options spring to mind. One is using javascript (via Rhino). The other
is
> the Ruby extension (not the current one, but the one that someone was
talking of
> contributing a few weeks back). Do either of those work for you?
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
Re: interactive shell for Excel/POI
Posted by Mark Fortner <ph...@gmail.com>.
A couple of other alternatives occurred to me:
1. Java shipped with a scripting shell in 1.5. The default language is
JavaScript, and the tool is called jrunscript. It can also be used with
other scripting languages. You can find a complete list of the supported
languages at http://scripting.dev.java.net
2. Groovy has it's own interactive shell, and you can use the @Grab
annotation (aka Grape) to load any library. I typically use this to load
Maven-based libraries. You can find out more information about these
technologies here:
- http://groovy.codehaus.org/Groovy+Shell
- http://groovy.codehaus.org/Grape
Hope this helps,
Mark
On Sun, May 15, 2011 at 12:54 PM, Jon Svede <js...@yahoo.com> wrote:
> Sorry for the late reply, I read this last week and have been thinking
about it.
>
> I don't know if either of those would address my desire. I hadn't heard
of
> Rhino, I'll have to look at it in detail. At a quick glance it looks
pretty
> programmer oriented and I wanted to get a little further away from what
looks
> like actual code (though I think one could say that any CLI is pretty
programmer
> oriented).
>
> Not sure how I would use the Ruby extension, especially one that isn't in
the
> API already(is that in the works? I haven't seen any posts on that
recently).
>
> Thanks,
>
> Jon
>
>
>
> ________________________________
> From: Nick Burch <ni...@alfresco.com>
> To: POI Users List <us...@poi.apache.org>
> Sent: Fri, May 6, 2011 10:17:06 PM
> Subject: Re: interactive shell for Excel/POI
>
> On Fri, 6 May 2011, Jon Svede wrote:
>> Is there a tool that will allow you to interact with a spreadsheet from a
>>shell?
>
> Two options spring to mind. One is using javascript (via Rhino). The other
is
> the Ruby extension (not the current one, but the one that someone was
talking of
> contributing a few weeks back). Do either of those work for you?
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
Re: interactive shell for Excel/POI
Posted by Nick Burch <ni...@alfresco.com>.
On Sun, 15 May 2011, Jon Svede wrote:
> Not sure how I would use the Ruby extension, especially one that isn't
> in the API already(is that in the works? I haven't seen any posts on
> that recently).
It's waiting on someone to review the patch and likely apply it...
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: interactive shell for Excel/POI
Posted by Jon Svede <js...@yahoo.com>.
Sorry for the late reply, I read this last week and have been thinking about it.
I don't know if either of those would address my desire. I hadn't heard of
Rhino, I'll have to look at it in detail. At a quick glance it looks pretty
programmer oriented and I wanted to get a little further away from what looks
like actual code (though I think one could say that any CLI is pretty programmer
oriented).
Not sure how I would use the Ruby extension, especially one that isn't in the
API already(is that in the works? I haven't seen any posts on that recently).
Thanks,
Jon
________________________________
From: Nick Burch <ni...@alfresco.com>
To: POI Users List <us...@poi.apache.org>
Sent: Fri, May 6, 2011 10:17:06 PM
Subject: Re: interactive shell for Excel/POI
On Fri, 6 May 2011, Jon Svede wrote:
> Is there a tool that will allow you to interact with a spreadsheet from a
>shell?
Two options spring to mind. One is using javascript (via Rhino). The other is
the Ruby extension (not the current one, but the one that someone was talking of
contributing a few weeks back). Do either of those work for you?
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: interactive shell for Excel/POI
Posted by Nick Burch <ni...@alfresco.com>.
On Fri, 6 May 2011, Jon Svede wrote:
> Is there a tool that will allow you to interact with a spreadsheet from
> a shell?
Two options spring to mind. One is using javascript (via Rhino). The other
is the Ruby extension (not the current one, but the one that someone was
talking of contributing a few weeks back). Do either of those work for
you?
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org