Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fxied #3 チェックマークが出力できるか検証する #4

Open
wants to merge 1 commit into
base: issues/#1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
vendor/bundle/
.idea/

outputs/

outputs/*.gem
*.rbc
/.config
Expand Down
14 changes: 14 additions & 0 deletions checkbox.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# coding:utf-8
require 'rubyXL'
# 新しいworkbookの作成
workbook = RubyXL::Workbook.new
# worksheetを取得
# デフォルトで1つ生成されている
worksheet = workbook[0]
# セルにチェックマークが追加
# wikipedia https://ja.wikipedia.org/wiki/%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%83%9E%E3%83%BC%E3%82%AF
cell = worksheet.add_cell(1, 0, '☑') #チェックマーク U+2611 BALLOT BOX WITH CHECK
cell2 = worksheet.add_cell(2, 0, '□') # 四角
cell3 = worksheet.add_cell(3, 0, '🗹') # U+1F5F9 BALLOT BOX WITH BOLD CHECK
# sample.xlsxという名前で保存
workbook.write('outputs/checkbox.xlsx')
Binary file added outputs/checkbox.xlsx
Binary file not shown.