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

Align Data into Merge cells #35

Open
kamal-bhatt opened this issue Jun 23, 2018 · 1 comment
Open

Align Data into Merge cells #35

kamal-bhatt opened this issue Jun 23, 2018 · 1 comment

Comments

@kamal-bhatt
Copy link

kamal-bhatt commented Jun 23, 2018

I have merge cell using this

> {{#xlsxAdd "xl/worksheets/sheet1.xml" "worksheet.sheetData[0].row"}}
> <row r="1">
>     <c r="A1" t="inlineStr">
>         <is> <t>Cell name</t>
>         </is>
>     </c>
> `</row>`
> {{/xlsxAdd}}
> 
> {{#xlsxReplace "xl/worksheets/sheet1.xml" "worksheet.mergeCells"}}
>     <mergeCells>
>         <mergeCell ref="A1:E1"/>
>     </mergeCells>
> {{/xlsxReplace}}

How can I align data to left,right,center

@bjrmatos
Copy link
Collaborator

hmm i don't have a good solution for this (i never tried to do the same before). maybe you can try to modify some styles that does that.

{{#xlsxReplace "xl/styles.xml"}}
  <stylesheet xmls="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
    ...modify content here...
  </stylesheet>
{{/xlsxReplace}}

another thing you can try to know which part you need to modify is to align a merged cell with normal Office program, save an excel file and then inspect it (rename the file from .xlsx to .zip and the unzip it to inspect the contents of the xlsx) to know how aligning merged cells looks like in Office xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants