The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hello, i need help for import sheet from Excel to Grid.
If i desire to know which is the type of a column, how can know this?
Example, if a column is DateTime and one user give me ''15/01/2006" and another user give me in other sheet, but in the same colummn ''01/15/2006'', how can work with this?
The same for numbers, if a user give me in a column 1.532,50 and another user give me in other sheet but in the some column 1,532.50, how can work with this?
Thanks for your response.
RARamu Syncfusion Team January 19, 2006 09:26 AM UTC
Hi Victor,
1) Currently there is no support in XlsIO for reading the default column formats in MS Excel [When an entire column in MS Excel was selected anddate formatting was applied]. However, we have an open feature request regarding this and it should be implemented shortly.
http://www.syncfusion.com/support/features/xlsio/Default.aspx?ToDo=view&questId=684
2) However you can retrieve the format used in each cell using IRange.NumberFormat
sheet1.Range ["A1"].NumberFormat
a) The potential problem in this approach is that the formatting used in
MS Excel is different from the .NET number formatting that the Essential
Grid uses so we have to manually map the two using regular expressions
so that the formatting inside the grid looks the same as MS Excel.
Here is a sample,
http://www.syncfusion.com/Support/user/uploads/F39702ExcelToGridFormatting_194b51a7.zip
b) There is also a converter utility class that is shipped with version 4.1 of essential grid that can import an MS Excel worksheet into the
Grid with most formatting. However currently it does not handle preserving number formats. We will support this functionality soon.
Please let me know if you have any questions.
Thanks,
Ramu.
VIVictorJanuary 20, 2006 10:38 AM UTC
Thanks Ramu for the material & explication.
Best Regards
Victor K
>Hi Victor,
>
>1) Currently there is no support in XlsIO for reading the default column formats in MS Excel [When an entire column in MS Excel was selected anddate formatting was applied]. However, we have an open feature request regarding this and it should be implemented shortly.
>
>http://www.syncfusion.com/support/features/xlsio/Default.aspx?ToDo=view&questId=684
>
>2) However you can retrieve the format used in each cell using IRange.NumberFormat
>
>sheet1.Range ["A1"].NumberFormat
>
>a) The potential problem in this approach is that the formatting used in
>MS Excel is different from the .NET number formatting that the Essential
>Grid uses so we have to manually map the two using regular expressions
>so that the formatting inside the grid looks the same as MS Excel.
>
>Here is a sample,
>
>http://www.syncfusion.com/Support/user/uploads/F39702ExcelToGridFormatting_194b51a7.zip
>
>b) There is also a converter utility class that is shipped with version 4.1 of essential grid that can import an MS Excel worksheet into the
>Grid with most formatting. However currently it does not handle preserving number formats. We will support this functionality soon.
>
>Please let me know if you have any questions.
>
>Thanks,
>Ramu.