Issue: ExportDataTableAsString doesn’t seem to handle properly the cases where exportColumnName is set to false.
Run the following code against the attached spreadsheet.
using System;
using System.Collections;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using Aspose.Cells;
using Aspose.Cells.Charts;
using Aspose.Cells.Drawing;
using Aspose.Cells.Pivot;
using Aspose.Cells.Rendering;
using Aspose.Cells.Tables;
using TestAspose.NorthwindDataSetTableAdapters;
//using pk =DocumentFormat.OpenXml.Packaging;
//using ox=DocumentFormat.OpenXml;
//using oxs = DocumentFormat.OpenXml.Spreadsheet;
namespace TestAspose
{
class Program
{
static void Main(string[] args)
{
TestExportDataTableAsString();
Console.WriteLine(“Done!”);
Console.ReadKey();
}
public static void TestExportDataTableAsString()
{
Workbook workbook = new Workbook(@“C:\temp\spreadsheets\test_ExportDataTableAsString.xlsx”);
Worksheet worksheet = workbook.Worksheets[0];
Range displayRange = worksheet.Cells.MaxDisplayRange;
DataTable dataTable = worksheet.Cells.ExportDataTableAsString(0, 0,displayRange.RowCount, displayRange.ColumnCount, false);
dataTable.TableName = “Data”;
Console.WriteLine(“First DataTable”);
dataTable.WriteXml(Console.Out);
Console.WriteLine();
ExportTableOptions options = new ExportTableOptions();
options.ExportAsString = true;
options.ExportColumnName = false;
dataTable = worksheet.Cells.ExportDataTable(0, 0, displayRange.RowCount, displayRange.ColumnCount, options);
dataTable.TableName = “Data2”;
Console.WriteLine();
Console.WriteLine(“Second DataTable”);
dataTable.WriteXml(Console.Out);
Console.WriteLine();
}
}
}
This program produces the following output:
First DataTable
ss
Second DataTable
1
2
4
ss
Done!
As you can see, the first row is missing in the first DataTable. That should not happen.
I tested this with version 7.5.3.4.
Thanks
Hi Costa,
Thank you for sharing your findings.
I am able to reproduce the issue on my end while using the latest version of the product, therefore I have logged it in our bug tracking system under ticket Id CELLSNET-42041. We will soon investigate it in detail, and will try to provide the fix at earliest.
Hi,
Just curious, when you post a new minor version of the dll, where can I see the changes that went into this release?
Thanks
Hi,
Sorry for the confusion, but I understood that you fixed the issue in this thread. What I was asking is what other changes went into 7.5.3.5 since 7.5.3.4 and whether it was possible to view the list of fixes?
Usually when a company releases a new version of a library they provide a list of changes since the previous release. Is there a list for 7.5.3.5?
Thank you
Hi,
Thanks, that was what I was looking for.
The issues you have found earlier (filed as CELLSNET-42041) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.