We’re trying to fetch data from the database and put in a table format using aspose.words for .NET. However the table requires a different level of padding/indentation for the data.
We tried to do the same using a template based approach using Mail Merge.Execute, but we could not achieve the required padding/indentation (See the highlighted text in the attached doc).
We could achieve the same using bookmark concept and creating the table dynamically ((See the highlighted text in the attached doc).
Is there a method to achieve the same level of formatting in the first approach?
Thanks for your request. Using a template based approach with Mail Merge you can create template with needed formatting. For example, you can use “Text to be inserted before” option of merge field to insert white space before midfield. In this case you can insert a white space as a part of merge field. Please see the following field code:
{MERGEFIELD test \b " " }
Also I do not understand, what level formatting do you mean. As I can see, there are just white spaces before text.
Thanks for the reply. We could use white spaces but the number of spaces or tabs depends on the data. Some of the rows have multiple spaces/indentation (explaining they are grouped at different level). The level of spaces is defined by the data retrieved. So Is it possible to set this beforehand in the template?