Unable print datatable in Excel template using smart markers

I am facing issue regarding datatable. I am using DataTable with datasource and in template using smart markers.

In data table I am adding rows and columns with values.

I am setting data table like this
designer.setdatasource(datatable);

And doing after designer.process()!

But in template by using smart markers unable to print.

Could you please help on that.

@Adivenkat,

Could you please create a sample console demo application (source code without compilation errors), zip the project with all the resource files (template Excel file (if any), output Excel file, etc.) and provide us to reproduce the issue on our end. We will check your issue soon.

It’s working now @amjad.sahi

After giving table name it is working

@Adivenkat,

Good to know that your issue is sorted out now. Feel free to write us back if you have further queries or comments.

Hi @amjad.sahi have one more doubt In my variable data I have html tags and style css for color. And this colors are having hca(1,3,45) like this so I am getting color related errors.

So, should Aspose not support this colour formats. If not what type it will support.

Is there any work around?

Ex"h1 style="color:hca(1,3,45) “> hello ”

@Adivenkat,

You may try to use rgb color formats.

Hi @amjad.sahi

I am facing one issue I am using smartmarkers with Html

In html for that variable having like this data

<P><span style=\"background-color:red;color:black\">Hello</span></p>

The background is applying cell level not text level how can I get the text level?

@Adivenkat,

I think this is same with MS Excel. How could you accomplish the task in MS Excel manually? I do not think this is possible in MS Excel. If you still think it is possible in MS Excel and you are able to do it, kindly do share your expected Excel (e.g., XLSX) file (you may create the file in MS Excel manually), we will check it soon. Please note, Aspose.Cells follows MS Excel standards and specification when creating or rendering MS Excel/HTML files.

Oh got it Thanks @amjad.sahi for giving quick response.

@Adivenkat
You are welcome. If you have any questions, please feel free to contact us.

Hi @John.He @amjad.sahi
I need to display some data in docx. So I have created template in template I am using smartmarkars and I have given like this [<<dt.First_Name>>] and this data have multiples. Like consider there are 5 first names. For this I am using DataTable.

So should I iterate or automatically it will iterate?
How can I use smartmarkers for doc using DataTable?

@Adivenkat,

I guess Aspose.Words has Mail Merge and LINQ Reporting Engine which are similar to Smart Markers to some extent. It is better you post your queries regarding MS Word (DOCX) file format in Aspose.Words forum. Smart Markers is Aspose.Cells’ feature for Excel files (XLS/XLSX) and not for Word (DOCX) files.