We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Import Sheet & Types of Columns

Thread ID:

Created:

Updated:

Platform:

Replies:

39702 Jan 16,2006 09:18 PM Jan 20,2006 05:38 AM Windows Forms 2
loading
Tags: XlsIO
Victor
Asked On January 16, 2006 09:18 PM

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.

Ramu [Syncfusion]
Replied On January 19, 2006 04:26 AM

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.

Victor
Replied On January 20, 2006 05:38 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;