UNPKG

to-spreadsheet

Version:

npm package to create spreadsheet in node environment and in browser

15 lines (14 loc) 962 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.generateWorkBookXmlRels = void 0; const util_1 = require("../../util"); const generateWorkBookXmlRels = (workbook) => `<?xml version="1.0" encoding="UTF-8"?> <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"> <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/> <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/> ${workbook.sheets.map((_, index) => ` <Relationship Id="rId${(0, util_1.indexToVbRelationIndex)(index)}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet${(0, util_1.indexToVbIndex)(index)}.xml"/> `).join('\n')} </Relationships> `; exports.generateWorkBookXmlRels = generateWorkBookXmlRels;