can you provide some more detail? with very much earlier version of
ironruby, i’ve fiddled with the idea of converting VB code that does
that to
ruby but gave up thinking it was too early to try.
whoops. i thought you meant Excel/Word automation, my bad.
Well, it could have been the case, but I’m avoiding that on purpose
My goal is more or less to rely on word/excel editable templates where I
inject data (fields, rows…) a bit like in Documatic (excellent project
although not active anymore afaik: http://stonecode.svnrepository.com/documatic/trac.cgi/wiki)
@Ryan: pretty much what I had in mind, except I didn’t know about Eric
White’s examples. Thanks a lot!
I’ll see if there is some benefit to wrap this up in an IronRuby gem
(and
will share it if it does).
On Wed, Oct 14, 2009 at 10:45 AM, Thibaut Barrère
<[email protected]
wrote:
@Ryan: pretty much what I had in mind, except I didn’t know about Eric
White’s examples. Thanks a lot!
I’ll see if there is some benefit to wrap this up in an IronRuby gem (and
will share it if it does).
Let me know if you want some help. I’ve done some work with this in C#
on a
recent project and never considered using IR for that, but it makes a
lot of
sense.
Let me know if you want some help. I’ve done some work with this in C# on
a recent project and never considered using IR for that, but it makes a
lot
of sense.
Sorry, I also should have noted that this code also relies on
win32ole.rb.
The one from Merlin\Main\Languages\Ruby\Libs for the interop
Best Regards,
Kevin
I’m attaching a couple of files because I had to do something very
similar just recently.
This isn’t super clean, as I’m still testing this functionality, but
it might serve as a starting point anyway.
I am calling c# code to require WorkBook.rb first. (Mostly just a
shortcut I grabbed from the excel interop tests)
I am then passing a fairly simple domain object into the
‘BuildRequestVolumeWorkBooks.rb’ through “CallerInput”
Then I set “CallerOutput” So I can grab the filenames generated after
applying my data to the template.
Sounds very much in line with what you’re trying to accomplish, but
again, maybe just as a starting point.
Ah, I see. I’ve posted it here: 210204’s gists · GitHub
Let me know what you find as you go, as I’ll likely have to to more
like this in the future as well.
Best Regards,
Kevin
On Wed, Oct 14, 2009 at 10:29 AM, Thibaut Barrère
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.