summaryrefslogtreecommitdiffhomepage
path: root/examples/anchor_swapping.rb
diff options
context:
space:
mode:
authorZsolt Kozaroczy <[email protected]>2020-09-11 00:36:29 +0200
committerGitHub <[email protected]>2020-09-11 00:36:29 +0200
commit282eec44ef01746ee25931fa6cd287ad083fd40b (patch)
tree14504bf429ca264812679ca971c1592853d3f762 /examples/anchor_swapping.rb
parent317e8244e4d17c394c1e181f86df3974623fb865 (diff)
downloadcaxlsx-282eec44ef01746ee25931fa6cd287ad083fd40b.tar.gz
caxlsx-282eec44ef01746ee25931fa6cd287ad083fd40b.zip
Restructure examples folder (#47)
Split examples into separate markdown files, each containing a description, sample code, and a screenshot of the resulting xlsx document. The script `generate.rb` is provided to actually generate the example documents by executing the sample code contained in the markdown files.
Diffstat (limited to 'examples/anchor_swapping.rb')
-rw-r--r--examples/anchor_swapping.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/examples/anchor_swapping.rb b/examples/anchor_swapping.rb
deleted file mode 100644
index 88302005..00000000
--- a/examples/anchor_swapping.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
-require 'axlsx'
-xls = Axlsx::Package.new
-wb = xls.workbook
-wb.add_worksheet do |ws|
- img = File.expand_path('../image1.jpeg', __FILE__)
- ws.add_image(:image_src => img) do |image|
- image.start_at 2, 2
- image.end_at 5, 5
- end
-end
-wb.add_worksheet do |ws|
- img = File.expand_path('../image1.jpeg', __FILE__)
- ws.add_image(:image_src => img, :start_at => "B2") do |image|
- image.width = 70
- image.height = 50
- end
-end
-wb.add_worksheet do |ws|
- img = File.expand_path('../image1.jpeg', __FILE__)
- ws.add_image(:image_src => img, :start_at => [1,1]) do |image|
- image.end_at "E7"
- end
-end
-
-
-
-xls.serialize 'anchor.xlsx'