Aspose.cells for .net $ sign with decimal values

Hi

I am using aspose.cells for .net

I have specified a datatable as the datasource for the smart marker template.

Aspose displays decimal values as “$14,040.04”, "$0.00"

Not sure why the additional “$” sign is added to the value when the dataset just has a value of “14,040.04” and "0.00"

Request you to please suggest how I can get rid of the “$” sign.




Hi,

Thanks for your posting and using Aspose.Cells.

Please download and try the latest version: Aspose.Cells
for .NET v8.2.2.3
and see if it resolves your issue.

If your problem still occurs, then we request you to please provide us some runnable sample console application project replicating your issue with the latest version. We will look into it and help you asap.

We have also tested this issue with the following sample code and the source Excel file attached with this post and did not find any issue. We have attached the output Excel file generated by the code for your reference.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\sample.xlsx”;


Workbook workbook = new Workbook(filePath);


Worksheet data = workbook.Worksheets[“Data”];


DataTable dt = data.Cells.ExportDataTable(0, 0, 3, 1, true);


dt.TableName = “SRC”;


WorkbookDesigner designer = new WorkbookDesigner(workbook);

designer.SetDataSource(dt);

designer.Process();


workbook.Save(filePath + “.out.xlsx”);

Please find attached the template and output generated.

I am using the below code to generate the output using the template file.



DataTable datatable= GetDetails();
string path = @“C:\AsposeTemplate.xls”;

//Create a workbookdesigner object
WorkbookDesigner designer = new WorkbookDesigner();
designer.Workbook = new Workbook(path);

//Set dataset as the datasource
designer.SetDataSource(datatable);

//Process the smart markers in the designer file
designer.Process();

//Save the excel file
designer.Workbook.Save(@“C:\AsposeOutput.xls”);

Request you to please reply at the earliest as we have a decision to be made about the usage of this tool.


Hi Manesh,

Thanks for your posting and using Aspose.Cells.

We tested this issue with the following sample code with your smart marker file i.e AsposeDollarSignIssue.xlsx and did not find any issue. It generates the correct file with correct data i.e without any $ sign.

Please see the screenshot of the output file for your reference. I have also attached the source Excel file used in the code and output Excel file generated by it for you to view.

C#


string filePath = @“F:\Shak-Data-RW\Downloads\AsposeDollarSignIssue.xlsx”;


Workbook workbook = new Workbook(filePath);


Worksheet data = workbook.Worksheets[“Data”];


DataTable dt = data.Cells.ExportDataTable(0, 0, 7, 3, true);

dt.TableName = “DatatableName”;


WorkbookDesigner designer = new WorkbookDesigner(workbook);

designer.SetDataSource(dt);

designer.Process();


workbook.Save(filePath + “.out.xlsx”);

Hi,

Excel has been applying some formatting.
I want to avoid the formatting.

But I am still able to reproduce it.

I need to provide a report about the usage of this product and this seems to be the only issue I am stuck with.

Request you to please consider this urgent . The issue is only with decimal fields.

Hi Manesh,

Thanks for your posting and using Aspose.Cells.

Please use the runnable code in the above post: 586901 and replicate this issue. If you are facing this issue, then you will be able to reproduce it with that sample code. It will help us look into your issue more closely and precisely and we will be able to figure out what you are doing wrong and advise you.

Thanks for your cooperation.


The issue is resolved.

It was a formatting issue with the template.

The column had formatting applied.

Changing it, resolved the issue.

Thanks for your time and efforts

Hi Manesh,

Thanks for your feedback and using Aspose.Cells.

It is good to know that you were able to sort out this issue. Let us know if you encounter any other issue, we will be glad to look into it and help you further.