|
@@ -46,7 +46,7 @@ function writeApp(sheets) {
|
|
|
rst.push('<ScaleCrop>false</ScaleCrop>');
|
|
|
rst.push('<HeadingPairs>');
|
|
|
rst.push('<vt:vector size="2" baseType="variant">');
|
|
|
- rst.push('<vt:variant><vt:lpstr>工作表</vt:lpstr></vt:variant>');
|
|
|
+ rst.push('<vt:variant><vt:lpstr>工作�</vt:lpstr></vt:variant>');
|
|
|
rst.push('<vt:variant><vt:i4>' + sheets.length + '</vt:i4></vt:variant>');
|
|
|
rst.push('</vt:vector>');
|
|
|
rst.push('</HeadingPairs>');
|
|
@@ -79,7 +79,7 @@ function writeCore() {
|
|
|
rst.push('<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">');
|
|
|
rst.push('<dc:creator>SmartCost</dc:creator>');
|
|
|
rst.push('<cp:lastModifiedBy>SmartCost</cp:lastModifiedBy>');
|
|
|
- var dt = new Date(), dtStr = dt.getFullYear() + '-' + p_fillZero(dt.getMonth()) + '-' + p_fillZero(dt.getDate()) + 'T' +
|
|
|
+ var dt = new Date(), dtStr = dt.getFullYear() + '-' + p_fillZero(dt.getMonth()+1) + '-' + p_fillZero(dt.getDate()) + 'T' +
|
|
|
p_fillZero(dt.getHours()) + ':' + p_fillZero(dt.getMinutes()) + ':' + p_fillZero(dt.getSeconds()) + 'Z';
|
|
|
rst.push('<dcterms:created xsi:type="dcterms:W3CDTF">' + dtStr + '</dcterms:created>');
|
|
|
rst.push('<dcterms:modified xsi:type="dcterms:W3CDTF">' + dtStr + '</dcterms:modified>');
|
|
@@ -122,7 +122,7 @@ function writeXlRels(sheets){
|
|
|
return rst;
|
|
|
}
|
|
|
function writeTheme(){
|
|
|
- var rst = fs.readFileSync('./excel_base_files/theme1.xml', 'utf8', 'r');
|
|
|
+ var rst = fs.readFileSync(__dirname + '/excel_base_files/theme1.xml', 'utf8', 'r');
|
|
|
return rst;
|
|
|
}
|
|
|
function writeStyles(styleList){
|
|
@@ -362,4 +362,7 @@ module.exports = {
|
|
|
,testWriteSharedString: function(sharedStrList){
|
|
|
return writeSharedString(sharedStrList);
|
|
|
}
|
|
|
+ ,testWriteTheme: function() {
|
|
|
+ return writeTheme();
|
|
|
+ }
|
|
|
}
|