Special character is induced which coping reading data from Excel

I am trying to read data from Excel, but the cell with value “L_x9110_01” is read with some special character. Data is attached with the mail.


Code:
Aspose.Cells.Cells cells = workbook.Worksheets[SheetName].Cells;
DataTable tableName = cells.ExportDataTableAsString(0, 0, cells.MaxDataRow + 1, cells.MaxDataColumn + 1, true);

Hi,


Thank you for using Aspose.Cells.

Please share the sample source excel file and runnable code that you are using to reproduce the issue. We will look into it and assist you further.

Also, we recommend you to please download and use this latest fix: Aspose.Cells for .NET v7.3.0.1 in your applications.

Please find sample excel attached with the mail.


Code:
using System;
using System.Data;
using Aspose.Cells;

namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
Workbook workbook = new Workbook(@“C:\Users\aniket\Desktop\Book1.xlsx”);

DataTable dataTable = new DataTable();

Aspose.Cells.Cells cells = workbook.Worksheets[“Sheet1”].Cells;

dataTable = cells.ExportDataTableAsString(0, 0, cells.MaxDataRow + 1, cells.MaxDataColumn + 1, true);
foreach(DataRow row in dataTable.Rows)
{
Console.WriteLine(row[0].ToString());
}
}
}
}

Output:

Hi,

I can find an issue as you have mentioned when exporting data from a worksheet (of your template file) to fill a data table. The issue is "_" character in A6 cell is replaced by some odd character.

Sample code:

using System;
using System.Data;
using Aspose.Cells;

namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
Workbook workbook = new Workbook(@"e:\test2\Book1.xlsx");

DataTable dataTable = new DataTable();

Aspose.Cells.Cells cells = workbook.Worksheets["Sheet1"].Cells;

dataTable = cells.ExportDataTableAsString(0, 0, cells.MaxDataRow + 1, cells.MaxDataColumn + 1, true);

foreach (DataRow row in dataTable.Rows)
{
Console.WriteLine(row[0].ToString());
}

//Even I tried.
cells.ImportDataTable(dataTable, false, "B20");

workbook.Save("e:\\test2\\output.xlsx");
}
}
}


I have logged a ticket with an id: CELLSNET-40888. We will look into your issue soon.

Thank you.

When i can expect a fix for the issue? Is there any work-around to avoid this issue?

Hi,


I have asked the relevant developer to update on your issue or share an eta for it. Once I receive any update, I will keep you posted here.

Thanks and sorry for any inconvenience caused!
Hi,

Please download and try this fix: Aspose.Cells for .NET v7.3.0.3

We have fixed your issue

Thanks

Thanks for the Fix.



Hi,


You are welcome!

Fee free to contact us any time if you need further help.

thank you.