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.

Reading excel file and converting to DataTable

Thread ID:

Created:

Updated:

Platform:

Replies:

28219 Apr 27,2005 05:57 AM May 3,2005 12:32 PM Windows Forms 1
loading
Tags: XlsIO
Administrator [Syncfusion]
Asked On April 27, 2005 05:57 AM

I use ExcelRW to read and excel file and convert it to a DataTable. Can you help me with the following questions? 1. I used ExportDataTable to convert from IWorksheet to DataTable. However, the generated DataTable contained the formulas from the excel file. How can I get everything exported as numbers? 2. Is there a way to determine the last used row and column in the excel file? Thanks, Kjetil

Administrator [Syncfusion]
Replied On May 3, 2005 12:32 PM

Hi Kjetil, 1) This is a shortcoming of the ExportDataTable method. I have filed a request to add an option to export the computed value http://www.syncfusion.com/support/issues/excelrw/Default.aspx?ToDo=view&questId=287 Currently, you could get the computed value by using IRange.FormulaNumberValue mySheet.Range["A1"].FormulaNumberValue 2) The last used row and column can be got using the IWorksheet.UsedRange example, mySheet.UsedRange.End.Column Thanks, Stephen. >I use ExcelRW to read and excel file and convert it to a DataTable. Can you help me with the following questions? > >1. I used ExportDataTable to convert from IWorksheet to DataTable. However, the generated DataTable contained the formulas from the excel file. How can I get everything exported as numbers? > >2. Is there a way to determine the last used row and column in the excel file? > >Thanks, >Kjetil

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.

;