Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
svb svb is offline
external usenet poster
 
Posts: 6
Default cell value not recognised

I populate spreadsheets with data retrieved from an access db using ADO via
an excel form. Connection string used is, strdb =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDbPath & ";Persist
Security Info=False"
I then access the spreadsheets via a .NET application and load various excel
row values into variables to be used by the application. ADO Connection
string used is,
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=Excel
8.0;HDR=No;IMEX=1;". The cell format in all cells in all spreadsheets is set
to Text. The problem I am having is that cell values occasionally get ignored
when reading rows via my .NET app. For example if I have a row, row 10,
A10="A10 cell value",B10="B10 cell value",C10="C10 cell value". I can see
the values in the spreadsheet, but when I loop through the cell values via my
..NET app sometimes only cells A10 and B10's values will be retrieved. This
does not always happen. For example a previous row may have 10 cells that
have values and all are retrieved correctly by the application. Hopefully i
have explained myself properly and any ideas would be greatly appreciated?
  #2   Report Post  
Posted to microsoft.public.excel.programming
svb svb is offline
external usenet poster
 
Posts: 6
Default cell value not recognised

....Another point is that the datatype of excel cells being ignored is
returned as 'dbnull' where I would expect it to be 'string'
It also seems to happen when rows are moved around, deleted, edited. So for
most rows it is ok as long as I don't move, add or delete rows. Also once the
error occurs even if I delete all cells in the sheet and re-add rows, it
still happens, almose like the worksheet is corrupt? Although I can see that
a particular contains text, I'm not sure what excel sees. I really would
appreciate any help with this, thanks.

"svb" wrote:

I populate spreadsheets with data retrieved from an access db using ADO via
an excel form. Connection string used is, strdb =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDbPath & ";Persist
Security Info=False"
I then access the spreadsheets via a .NET application and load various excel
row values into variables to be used by the application. ADO Connection
string used is,
strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties=Excel
8.0;HDR=No;IMEX=1;". The cell format in all cells in all spreadsheets is set
to Text. The problem I am having is that cell values occasionally get ignored
when reading rows via my .NET app. For example if I have a row, row 10,
A10="A10 cell value",B10="B10 cell value",C10="C10 cell value". I can see
the values in the spreadsheet, but when I loop through the cell values via my
.NET app sometimes only cells A10 and B10's values will be retrieved. This
does not always happen. For example a previous row may have 10 cells that
have values and all are retrieved correctly by the application. Hopefully i
have explained myself properly and any ideas would be greatly appreciated?

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
dates not recognised DL Excel Discussion (Misc queries) 1 May 27th 10 11:33 PM
Cell contents not recognised untill clicked Ade Excel Discussion (Misc queries) 3 March 28th 07 02:08 AM
VBA not recognised by Autorecover Gizmo63 Excel Discussion (Misc queries) 4 July 25th 06 02:42 PM
how do i change 20050614 within in a cell to a recognised date Richard carpenter @ uniq Excel Worksheet Functions 1 June 8th 05 11:32 AM
Name not recognised Jerome_t Excel Programming 5 April 23rd 04 06:10 PM


All times are GMT +1. The time now is 11:14 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"