Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi All, I am reading an excel sheet using OLEDB connection , now what I want t know is how can I make out that the sheet whether the sheet is blank o not ?? Here is my code //////////////////////////////////////////////////////////////////////////////////// Dim connString As [String] = "Provider=Microsoft.Jet.OLEDB.4.0;" "Data Source=" + excelFile + ";Extended Properties=Excel 8.0;" objConn = New OleDb.OleDbConnection(connString) Dim commandTxt As String = "Select * from [Sheet1$]" command = New System.Data.OleDb.OleDbDataAdapter(commandTxt, objConn) objConn.Open() DS = New DataSet command.Fill(DS) //////////////////////////////////////////////////////////////////////////////// I tried this Dim i as integer i = DS.Tables(0).Rows.Count if i 1 then end if But the results were not as excepted and did not form any pattern using which I could conclude that this condition gives me the exac result Thanx & Regards, Abh -- Abhi Kuma ----------------------------------------------------------------------- Abhi Kumar's Profile: http://www.msusenet.com/member.php?userid=502 View this thread: http://www.msusenet.com/t-187104747 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Identifying non-returning formula (blank Cell) | Excel Worksheet Functions | |||
Help Identifying code statement | Excel Discussion (Misc queries) | |||
Identifying first non blank cell in 3 different columns | Excel Discussion (Misc queries) | |||
Personally Identifying information in Excel Sheet | Excel Worksheet Functions | |||
Identifying blank rows | Excel Programming |