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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

handling empty cells when the variable is oher type than string

Thread ID:





50839 Oct 20,2006 04:40 AM UTC Oct 23,2006 07:13 AM UTC WinForms 1
Tags: XlsIO
Kari Paukku
Asked On October 20, 2006 04:40 AM UTC


Is there a better way to program a case when,reading data from an excel-sheet, a cell is empty and the data from the cell should go to a double variable?

This works:
Dim d as double
If sheet.Range(Row, 1).Value <> "" Then
d = sheet.Range(Row, 1).Value
End If

However it would be nicer not to have the if clause.


Melba Winshia [Syncfusion]
Replied On October 23, 2006 07:13 AM UTC

Hi Kari,

Use the following code snippets to check if the cell is blank or not.

sheet.Range(2, 1).IsBlank = False

Here is the sample for your reference:


Please take a look at the sample above and let me know if you have any other questions.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon