ImportData with ExcelNestedDataLayoutOptions.Merge skips some columns

This is related to my previous question: https://www.syncfusion.com/forums/158738/save-tree-like-data-to-excel

I've made a simple sample application to reproduce it.
This is my result:

Several parts are not as expected:
  1. Column I and J are wrong. The data in H, I and J should be 2 cells to the left.
  2. Column B, D and E are DateTime values. After setting a style for the background and the borders the date values are changed to numbers.
I also have another question.
Is it possible to set different colors for the background making it easier to see which rows belong to each other?
In the screenshot I would like rows 2, 3 and 4 to have a darker background, row 5 a lighter one and rows 6 and 7 to be darker again.
Zebra style as it is called with HTML-tables and grids.

Please advice how to change my code to get this working properly.


Attachment: SyncfusionNestedDataLayout_68db0449.zip

10 Replies 1 reply marked as answer

SK Shamini Kiruba Sobers Syncfusion Team October 20, 2020 11:52 AM UTC

Hi Paul, 

Greetings from Syncfusion support. 

Please find the response for your queries from the following table. 

Query 
Response 
Column I and J are wrong. The data in H, I and J should be 2 cells to the left. 
We are able to reproduce the reported issue and validating it currently. We will share the validation details on October 22nd, 2020
Column B, D and E are DateTime values. After setting a style for the background and the borders the date values are changed to numbers. 
Kindly set the IncludeNumberFormat property to false as below, before setting the cell styles. 

Code snippet: 

defaultCellStyle.IncludeNumberFormat = false; 
worksheet.UsedRange.CellStyle = defaultCellStyle; 


Is it possible to set different colors for the background making it easier to see which rows belong to each other? 
In the screenshot I would like rows 2, 3 and 4 to have a darker background, row 5 a lighter one and rows 6 and 7 to be darker again. 
It is not possible to set different colors for each employee on importing the data. You have to manually set the styles based on the rows. The following UG link might help in achieving your requirement. 



Kindly let us know if the solutions help. 

Regards,
Shamini 



PM Paul Meems October 20, 2020 12:56 PM UTC

Thanks for the help.

I can confirm defaultCellStyle.IncludeNumberFormat = false;  is solving my issue with the date formats.

Looking forward to seeing the shift of the columns fixed soon.


Regards,

Paul



SK Shamini Kiruba Sobers Syncfusion Team October 21, 2020 10:36 AM UTC

Hi Paul, 

Thanks for the update. 

We will share the validation details for skipping of columns on October 22nd, 2020 as promised earlier. 

Regards,
Shamini 



SK Shamini Kiruba Sobers Syncfusion Team October 22, 2020 02:38 PM UTC

Hi Paul, 
 
We appreciate your patience. 
 
We have validated the issue Data is incorrect while importing nested object collection and logged a defect report. The fix for the issue will be available on November 5th, 2020. You can track the status of the issue through the following link. 
 
 
Kindly confirm your working version of Syncfusion XlsIO so that we can provide patch in that version. 
 
Regards, 
Shamini 



PM Paul Meems October 23, 2020 10:12 AM UTC

I'm using NuGet package Syncfusion.XlsIO.Net.Core v18.3.0.42.
I'm still in the development phase so I can easily update the package.


SK Shamini Kiruba Sobers Syncfusion Team October 23, 2020 11:49 AM UTC

Hi Paul, 

Thanks for the update. 

As mentioned earlier, the fix for the reported issue will be available on November 5th, 2020 and we do have weekly NuGet releases on every Tuesday. Hence, the fix will be included in the weekly NuGet package that rolls out after the mentioned date. 

We appreciate your patience. 

Regards, 
Shamini 



SK Shamini Kiruba Sobers Syncfusion Team November 5, 2020 02:06 PM UTC

Hi Paul, 

We have fixed the reported issue and generated custom NuGet package of Syncfusion.XlsIO.Net.Core in the version v18.3.0.42. Kindly download the same from the following link and let us know if it resolves the issue. 

We will include the fix in the upcoming weekly NuGet release on November 10th 2020 and let you know once the package is available for download. 

Regards, 
Shamini 



SK Shamini Kiruba Sobers Syncfusion Team November 11, 2020 09:13 AM UTC

Hi Paul, 

Thanks for the patience. 

We are glad to announce that our latest weekly NuGet release v18.3.0.48 is rolled out and is available for download under the following link.   

This package includes the fix to resolve the reported issue Data is incorrect while importing nested object collection

Regards, 
Shamini 


Marked as answer

PM Paul Meems November 13, 2020 08:50 AM UTC

I can confirm v18.3.0.48 is solving the issue.

With v18.3.0.40 my export looked like:


And with v18.3.0.48 it looks like:


Thanks for the fix.
This issue can be closed.


SK Shamini Kiruba Sobers Syncfusion Team November 13, 2020 09:14 AM UTC

Hi Paul, 

Thanks for the update. We are glad that the fix resolved your issue. 

Regards, 
Shamini 


Loader.
Up arrow icon