Comments (4)
Hello @Kolis121 ,
Can you please send me your template (in docx format), data + code so that I can reproduce the issue.
It seems that your loops are never closed in your sample.
from docxtemplater.
I'm closing this since there's not much I can do without more information.
from docxtemplater.
Sorry, I got stuck with some other stuff...
Please find attached the Word file I tested back then.
I just wanted to replicate this issue to be sure, but I realized I have another error "Error: Scope parser execution failed" - I used the ExpressionParser you used in #717. I guess this Expression Parser you used cannot handle the conditions in the tag.
from docxtemplater.
Are you using following code :
const expressionParser = require("docxtemplater/expressions-ie11.js");
const doc = new Docxtemplater(zip, { parser: function(tag) {
return {
get: function(scope, context) {
const result = expressionParser(tag).get(scope, context);
return result;
}
}
}});
doc.render(tags);
If yes, please make sure that you are using the latest docxtemplater (3.37.8)
If this still happens, please try the following and report back the new logs :
const expressionParser = require("docxtemplater/expressions-ie11.js");
const doc = new Docxtemplater(zip, {
parser: function(tag) {
return {
get (scope, context) {
try {
const result = expressionParser(tag).get(scope, context);
return result;
} catch (e) {
console.log(e.message);
console.log(e.stack);
throw e;
}
},
};
},
});
doc.render(tags);
from docxtemplater.
Related Issues (20)
- Cannot resolve @Name placeholder HOT 2
- Chart Module: Unexpected Behavior with Null Value in Data HOT 3
- Differentiate between conditions and loops when getting tags HOT 1
- Conditional assignment doesn't work as expected HOT 1
- Page break propogates to all elements inside div HOT 5
- Numbering for conditional text HOT 3
- Question: Importing ExpressionParser in TypeScript. HOT 6
- When I write a tag in complex content, it doesn't work HOT 4
- HTMLModule Dependencies causing errors HOT 1
- paragraphLoop doesn't seem to work HOT 2
- ChartModule + ErrorLocationModule HOT 2
- Bun.sh HOT 1
- Trying to setup angular parser, but is failing with compilation error. HOT 8
- getSize 返回一个promsie ,word预览正常,但是导出word图片丢失 HOT 2
- Compile (tsx) issue with TxtTemplater HOT 1
- Ability to Insert IDs into XML Tags HOT 1
- Slides demo is broken HOT 1
- According to Microsoft Word, the generated file is corrupted. Cannot open it. HOT 12
- Duplicate content of a word file (in one page) HOT 1
- Error: New Delimiters cannot be parsed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docxtemplater.