Ryan Riley
2009-Oct-14 15:32 UTC
[Ironruby-core] Prior art of manipulating OpenXML with IronRuby ?
On Wed, Oct 14, 2009 at 10:03 AM, Thibaut Barr?re <thibaut.barrere at gmail.com> wrote:> Hi, > I''m going to need manipulation of Excel/Word documents for a production app > - I''ll use IronRuby there. > > Did anyone develop some kind of tool or dsl to handle these manipulations > already ? > > I''d like to avoid reinventing the wheel if it''s the case, >You could reference the Open XML SDK<http://www.microsoft.com/downloads/details.aspx?FamilyID=c6e744e5-36e9-45f5-8d8c-331df206e0d0&DisplayLang=en>and use that from within IronRuby. See Eric White''s excellent examples in C#<http://blogs.msdn.com/ericwhite/archive/2008/10/20/eric-white-s-blog-s-table-of-contents.aspx>for usage. Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20091014/5871fa2e/attachment.html>
Ryan Riley
2009-Oct-14 16:00 UTC
[Ironruby-core] Prior art of manipulating OpenXML with IronRuby ?
On Wed, Oct 14, 2009 at 10:45 AM, Thibaut Barr?re <thibaut.barrere at gmail.com> 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. :) Ryan Riley Email: ryan.riley at panesofglass.org LinkedIn: http://www.linkedin.com/in/ryanriley Blog: http://wizardsofsmart.net/ Website: http://panesofglass.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20091014/22474944/attachment.html>
Kevin Radcliffe
2009-Oct-14 16:20 UTC
[Ironruby-core] Prior art of manipulating OpenXML with IronRuby ?
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 On Wed, Oct 14, 2009 at 10:12 AM, Kevin Radcliffe <kevin.radcliffe at gmail.com> wrote:> 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. > > Best Regards, > Kevin Radcliffe > > On Wed, Oct 14, 2009 at 9:45 AM, Thibaut Barr?re > <thibaut.barrere at gmail.com> wrote: >>> 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). >> >> best, >> >> Thibaut >> -- >> http://www.learnivore.com >> >> _______________________________________________ >> Ironruby-core mailing list >> Ironruby-core at rubyforge.org >> http://rubyforge.org/mailman/listinfo/ironruby-core >> >> >
Kevin Radcliffe
2009-Oct-14 16:36 UTC
[Ironruby-core] Prior art of manipulating OpenXML with IronRuby ?
Ah, I see. I''ve posted it here: http://gist.github.com/210204 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 <thibaut.barrere at gmail.com> wrote:> Hey Kevin, > > looks like your first message didn''t make it (maybe because of attachments > ?) > > Any code will be useful though (who knows where this is going to lead me :-) > - can you paste it on http://gist.github.com/ ? > > -- Thibaut > > _______________________________________________ > Ironruby-core mailing list > Ironruby-core at rubyforge.org > http://rubyforge.org/mailman/listinfo/ironruby-core > >