summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2012-06-20 19:40:59 +0900
committerRandy Morgan <[email protected]>2012-06-20 19:40:59 +0900
commitaa361626894b48fbd9ab2aa19d1e4e34ec704b33 (patch)
treeef579baf61693b9ac016a06b5e3621b6d9167c93 /lib/axlsx/workbook
parent3d3d8e3aba0c49fe5adef5cf1058c3157314b2b2 (diff)
downloadcaxlsx-aa361626894b48fbd9ab2aa19d1e4e34ec704b33.tar.gz
caxlsx-aa361626894b48fbd9ab2aa19d1e4e34ec704b33.zip
parse out protected_range: NOTE excel does not support this part of the spec!
Diffstat (limited to 'lib/axlsx/workbook')
-rw-r--r--lib/axlsx/workbook/worksheet/worksheet.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/axlsx/workbook/worksheet/worksheet.rb b/lib/axlsx/workbook/worksheet/worksheet.rb
index 513f0453..d5c1037b 100644
--- a/lib/axlsx/workbook/worksheet/worksheet.rb
+++ b/lib/axlsx/workbook/worksheet/worksheet.rb
@@ -541,6 +541,11 @@ module Axlsx
str.concat '</sheetData>'
str.concat "<autoFilter ref='%s'></autoFilter>" % @auto_filter if @auto_filter
@sheet_protection.to_xml_string(str) if @sheet_protection
+ unless @protected_ranges.empty?
+ str << '<protectedRanges>'
+ @protected_ranges.each { |pr| pr.to_xml_string(str) }
+ str << '</protectedRanges>'
+ end
str.concat "<mergeCells count='%s'>%s</mergeCells>" % [@merged_cells.size, @merged_cells.reduce('') { |memo, obj| memo += "<mergeCell ref='%s'></mergeCell>" % obj } ] unless @merged_cells.empty?
print_options.to_xml_string(str) if @print_options
page_margins.to_xml_string(str) if @page_margins