exceljs
Version:
Excel Workbook Manager - Read and Write xlsx and csv Files.
102 lines (91 loc) • 3.83 kB
text/xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<worksheet
xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="x14ac"
xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
<sheetPr>
<pageSetUpPr fitToPage="<%=fitToPage%>"/>
<% if (typeof tabColor !== 'undefined') { %>
<tabColor rgb="<%=tabColor%>"/>
<% } %>
</sheetPr>
<dimension ref="<%=dimensions%>"/>
<sheetViews>
<sheetView
workbookViewId="0"
<% if(showGridLines !== undefined) {%> showGridLines="<%=showGridLines%>"<% } %>>
<% if (freezePane) { %> <pane xSplit="<%=freezePane.x%>" ySplit="<%=freezePane.y%>" topLeftCell="<%=String.fromCharCode(freezePane.x+65,freezePane.y+49)%>" activePane="bottomRight" state="frozen"/> <% } %>
</sheetView>
</sheetViews>
<sheetFormatPr defaultRowHeight="15" x14ac:dyDescent="0.25"/>
<% if (cols) { %>
<cols>
<% cols.forEach(function(col) { %>
<col min="<%=col.min%>"
max="<%=col.max%>"
width="<%=col.width%>"
<% if (col.styleId) { %> style="<%=col.styleId%>" <% } %>
<% if (col.hidden) { %> hidden="1" <% } %>
<% if (col.outlineLevel) {%> outlineLevel="<%=col.outlineLevel%>"<% } %>
customWidth="1"/><% }); %>
</cols>
<% } %>
<sheetData>
<% rows.forEach(function(row) { %>
<row r="<%=row.number%>"
<% if(row.height) {%> ht="<%=row.height%>" customHeight="1"<% } %>
<% if(row.hidden) {%> hidden="1"<% } %>
<% if(row.outlineLevel) {%> outlineLevel="<%=row.outlineLevel%>"<% } %>
spans="<%=row.min%>:<%=row.max%>"
<% if (row.styleId) { %> s="<%=row.styleId%>" customFormat="1" <% } %>
x14ac:dyDescent="0.25">
<% row.cells.forEach(function(cell){ %>
<%=cell.xml%><% }); %>
</row>
<% }); %>
</sheetData>
<% if (merges) { %>
<mergeCells count="2">
<% _.each(merges, function(dimensions) { %>
<mergeCell ref="<%=dimensions%>"/>
<% }); %>
</mergeCells>
<% } %>
<% if (hyperlinks) { %>
<hyperlinks>
<% _.each(hyperlinks, function(hyperlink) { %>
<hyperlink ref="<%=hyperlink.address%>" r:id="<%=hyperlink.rId%>"/>
<% }); %>
</hyperlinks>
<% } %>
<%=dataValidations.xml%>
<% if (typeof pageMargins !== 'undefined') { %>
<pageMargins
left="<%=(pageMargins.left || 0.7)%>"
right="<%=(pageMargins.right || 0.7)%>"
top="<%=(pageMargins.top || 0.75)%>"
bottom="<%=(pageMargins.bottom || 0.75)%>"
header="<%=(pageMargins.header || 0.3)%>"
footer="<%=(pageMargins.footer || 0.3)%>"/>
<% } %>
<% if (typeof pageSetup !== 'undefined') { %>
<pageSetup
paperSize="<%=(pageSetup.paperSize || 9)%>"
scale="<%=(pageSetup.scale || 100)%>"
firstPageNumber="<%=(pageSetup.firstPageNumber || 0)%>"
fitToWidth="<%=(pageSetup.fitToWidth || 1)%>"
fitToHeight="<%=(pageSetup.fitToHeight || 1)%>"
pageOrder="<%=(pageSetup.pageOrder || 'downThenOver')%>"
orientation="<%=(pageSetup.orientation || 'portrait')%>"
usePrinterDefaults="<%=(pageSetup.usePrinterDefaults || 'false')%>"
blackAndWhite="<%=(pageSetup.blackAndWhite || 'false')%>"
draft="<%=(pageSetup.draft || 'false')%>"
cellComments="<%=(pageSetup.cellComments || 'none')%>"
useFirstPageNumber="<%=(pageSetup.useFirstPageNumber || 'false')%>"
horizontalDpi="<%=(pageSetup.horizontalDpi || 300)%>"
verticalDpi="<%=(pageSetup.verticalDpi || 300)%>"
copies="<%=(pageSetup.copies || 1)%>"/>
<% } %>
</worksheet>