Permalink
Browse files

@jurriaan is a rockstar.

  • Loading branch information...
1 parent bdf77ce commit cec81bb125ae4a97d83517e514e9ca9ee387398f @randym randym committed Mar 21, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 examples/example.rb
View
@@ -1,6 +1,7 @@
#!/usr/bin/env ruby -w -s
# -*- coding: utf-8 -*-
-require 'axlsx.rb'
+$:.unshift "#{File.dirname(__FILE__)}/../lib"
+require 'axlsx'
p = Axlsx::Package.new
wb = p.workbook
@@ -39,7 +40,7 @@
##Add an Image
wb.add_worksheet(:name => "Images") do |sheet|
- img = File.expand_path('examples/image1.jpeg')
+ img = File.expand_path('../image1.jpeg', __FILE__)
sheet.add_image(:image_src => img, :noSelect => true, :noMove => true) do |image|
image.width=720
image.height=666
@@ -50,7 +51,7 @@
##Add an Image with a hyperlink
wb.add_worksheet(:name => "Image with Hyperlink") do |sheet|
- img = File.expand_path('examples/image1.jpeg')
+ img = File.expand_path('../image1.jpeg', __FILE__)
sheet.add_image(:image_src => img, :noSelect => true, :noMove => true, :hyperlink=>"http://axlsx.blogspot.com") do |image|
image.width=720
image.height=666

0 comments on commit cec81bb

Please sign in to comment.