Thanks for the tips.  I think I may have found out my problem.  I have two 
programs. The first is a download program which pulls records into a 
spreadsheet. The second can uploads those records into another database.  When 
the first program runs, it creates a named range(which I didn't know) called 
LASPBS which goes from the first record to the last record.  When I pull up the 
data it is in a tabbed sheet at the bottom called LASPBS as well.....  
 
In program 2, I do a select * from LASPBS(expecting it to pull from the sheet). 
 Turns out, it hits the named range first. No problem until you add records to 
the spreadsheet. The named range still stays the same as it was when the first 
time it was created.  Say the first time it ran the spreadsheet had 100 records 
in it, the range would be from 1-100.  If you manually add in another 50 
records and rerun it, the select statement pulls from the range LASPBS which is 
still stated as 1-100 and ignores the new 50.  Two ways around it, name the 
sheet something different than the range or change the select statement to... 
select * from [LASPBS$] which will grab the sheet and not the named range.
 
Easy fix but what a total beast to try and step through and resolve.
 
Thanks

Lee

 

> Date: Sat, 18 Aug 2012 07:56:16 -0500
> Subject: Re: [DotNetDevelopment] Select * from a Excel Spreadsheet Stops 
> after 894 records
> From: [email protected]
> To: [email protected]
> 
> On Fri, Aug 17, 2012 at 11:03 AM, crocboy25 <[email protected]> wrote:
> > Hello Group,
> >
> > I am selecting rows from an excel spreadsheet. In the spreadsheet I have
> > like 2000+ rows, sometimes even more. When I run a spreadsheet it always
> > stop reading the rows on line number 899. I have checked the data on the
> > row, the row before and after and nothing seems out of the ordinary that
> > would make it stop. Only 7 columns of small amounts of data per column. Any
> > idea why the reader would stop on a particular line and not move forward? It
> > doesnt error out but when I check data adapter after it executes it only has
> > like 895 records(the first 4-5 lines in excel are used as headers on my
> > spreadsheets). I tried it with both an xls file and a xlsx file with the
> > same results. Any idea what could be causing this? Thanks for any
> > assistance.
> >
> > The string variable strConnection is set to .....
> >
> > Provider= Microsoft.ACE.OLEDB.12.0;Data
> > Source=c:\excel\upload\9907USS103402.XLSX; Extended Properties="Excel
> > 12.0;HDR=NO;IMEX=1;";
> >
> > Dim pobjDataAdapter As OleDbDataAdapter
> >
> > pobjDataAdapter = New OleDbDataAdapter("select * from LASPBS",
> > strConnection)
> -----------------------------
> 
> Is there a range on this workbook?
> 
> -- 
> Stephen Russell
> Sr. Analyst
> Ring Container Technology
> Oakland TN
> 
> 901.246-0159 cell
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
> Web Services,.NET Remoting" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
> or visit the group website at http://megasolutions.net
                                          

-- 
You received this message because you are subscribed to the Google
Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML
Web Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en
or visit the group website at http://megasolutions.net

Reply via email to