-
Notifications
You must be signed in to change notification settings - Fork 4
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
Merge Cells #15
Comments
An extension to cellXfs such as the following should be made to extend the xfs XML generation found in StyleXML.
alignment0←2 'alignment' ''('horizontal' 'center')
alignment1←2 'alignment' ''('wrapText' '1')
spread←↑alignment1{(⍵,(≢⍵)⍴⊂⍺)[{⍋⍵,⍵}⍳≢⍵]}↓c An extension for rows is required. The value is placed into the first cell of the range that is to be merged. Other cell values are empty, but have the same type and style xfs index. <row r="1" spans="1:4" x14ac:dyDescent="0.35">
<c r="A1" s="1" t="s">
<v>0</v>
</c>
<c r="B1" s="1"/>
<c r="C1" s="1"/>
<c r="D1" s="1"/>
</row>
<row r="2" spans="1:4" x14ac:dyDescent="0.35">
<c r="A2" s="1"/>
<c r="B2" s="1"/>
<c r="C2" s="1"/>
<c r="D2" s="1"/>
</row>
<row r="3" spans="1:4" x14ac:dyDescent="0.35">
<c r="A3" s="1"/>
<c r="B3" s="1"/>
<c r="C3" s="1"/>
<c r="D3" s="1"/>
</row>
.
.
.
|
MergeCells should be a boolean flag in the range object. All of the other properties in the range should be "scalar" or if an array is defined that matches the shape of the range, simply take the first item for the property and ignore the rest. |
Not sure what you are planning for alignment, but should be just properties of the range like Value. HorizontalAlignment and VerticalAlignment. |
@PaulMansour The point I was making about multiple alignment properties is that |
Yes. Open excel and look at the Alignment tab on the Format Cells dialog box. |
Commit 04f2c2c adds the following attributes to Ranges range.MergeCells←1 ⍝ boolean scalar
range.Horizontal←⊂'center' ⍝ nested charvec, or nested char mat corresponding to the cells in range.Value
range.Vertical ←⊂'center' ⍝same as Horizontal
range.WrapText←1 ⍝ boolean scalar/vec/mat corresponding to the cells in range.Value
range.ShrinkToFie←1 ⍝ same as range.WrapText Tests are yet to be added to validate these features. Please test them at your leisure @PaulMansour @mkromberg
|
The Merge Cells feature should be an optional property of a range.
This requires the same extension to cellXfs required by wrap text #14
The text was updated successfully, but these errors were encountered: