Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default While reading excel file i am getting null values

Hi guys,

I am writing a program to import data from a excel file
using a MS Visual Basic 6.0.
I am using "Microsoft.Jet.OLEDB.4.0" as the provider. While I am reading the
excel file I am getting null values for some fields which is not null in the
excel file. Can any one help me to resolve this please.

Thanks,
-Aruna


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default While reading excel file i am getting null values

Why not set a ref to the excel obj library the just open
the workbook ? That way you can manipulate the worksheet
object etc etc

dim xl as excel.application
dim wb as excel.workbook
dim ws as excel.worksheet
dim cell as excel.range

set xl = new excel.application
set wb = xl.workbooks.open(ThisWorkbook)
set ws = wb.activesheet

....do something with the sheet..
for each cell in ws.Range("C3:K12")
...blah
Next
...
...
wb.close false ' close the book without saving
xl.quit
set ws = nothing
set wb = nothing
set cell = nothing
set xl = nothing


HTH

Patrick Molloy
Microsoft Excel MVP

-----Original Message-----
Hi guys,

I am writing a program to import data

from a excel file
using a MS Visual Basic 6.0.
I am using "Microsoft.Jet.OLEDB.4.0" as the provider.

While I am reading the
excel file I am getting null values for some fields

which is not null in the
excel file. Can any one help me to resolve this please.

Thanks,
-Aruna


.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel reading pasted values as Scientific Notation Brad Autry Excel Discussion (Misc queries) 2 September 8th 09 05:00 PM
How do I find and replace null values in Excel 2002 worksheets? Peter Excel Worksheet Functions 5 October 27th 06 04:53 AM
CSV export from Excel always recognise null values in the last col RichardOKeefe Excel Discussion (Misc queries) 2 April 28th 06 06:56 AM
Reading an excel file in SPSS Gary Excel Programming 4 April 17th 04 04:03 PM
Reading an Excel file after upload Quan[_2_] Excel Programming 0 November 6th 03 12:12 AM


All times are GMT +1. The time now is 09:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"