Click here to Skip to main content
15,909,742 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can a custom property get it's values form a database? Pin
maryam.saboor17-Feb-08 23:13
professionalmaryam.saboor17-Feb-08 23:13 
GeneralRe: How can a custom property get it's values form a database? Pin
Luc Pattyn18-Feb-08 1:13
sitebuilderLuc Pattyn18-Feb-08 1:13 
GeneralRe: How can a custom property get it's values form a database? Pin
maryam.saboor18-Feb-08 1:29
professionalmaryam.saboor18-Feb-08 1:29 
GeneralRe: How can a custom property get it's values form a database? Pin
Luc Pattyn18-Feb-08 1:39
sitebuilderLuc Pattyn18-Feb-08 1:39 
Generalprocess Pin
sobhaniir17-Feb-08 20:33
sobhaniir17-Feb-08 20:33 
GeneralRe: process Pin
Giorgi Dalakishvili17-Feb-08 20:56
mentorGiorgi Dalakishvili17-Feb-08 20:56 
GeneralRe: process Pin
sobhaniir18-Feb-08 1:56
sobhaniir18-Feb-08 1:56 
QuestionHow to select rows from Excel file with query? Pin
Noemi Katinka17-Feb-08 20:16
Noemi Katinka17-Feb-08 20:16 
Hi everybody!

I have an Excel file and i want to select from the file just some rows.
I can select the whole file in the following way:

private static DataTable GetDataFromXLS(string strFilePath)
{
string strConn;
strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +"Data Source="+strFilePath+"; Jet OLEDB:Engine Type=5;" + "Extended Properties=Excel 8.0;";

OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", strConn);
DataSet myDataSet = new DataSet();

myCommand.Fill(myDataSet, "ExcelInfo");

DataTable dt = myDataSet.Tables[0];

return dt;
}

But i don't need the whole excel file just a few rows. How can i do this from the query?
It is possibile to do this with a query?

Thanks for your help!
QuestionHow to handle keypressevent Pin
dnyanubhamare17-Feb-08 19:17
dnyanubhamare17-Feb-08 19:17 
AnswerRe: How to handle keypressevent Pin
Christian Graus17-Feb-08 19:23
protectorChristian Graus17-Feb-08 19:23 
AnswerRe: How to handle keypressevent Pin
Ravenet17-Feb-08 19:53
Ravenet17-Feb-08 19:53 
GeneralRe: How to handle keypressevent Pin
Xmen Real 17-Feb-08 20:40
professional Xmen Real 17-Feb-08 20:40 
GeneralRe: How to handle keypressevent Pin
Christian Graus17-Feb-08 22:04
protectorChristian Graus17-Feb-08 22:04 
GeneralRe: How to handle keypressevent Pin
Xmen Real 17-Feb-08 22:39
professional Xmen Real 17-Feb-08 22:39 
GeneralRe: How to handle keypressevent Pin
Christian Graus17-Feb-08 22:03
protectorChristian Graus17-Feb-08 22:03 
GeneralRe: How to handle keypressevent Pin
Pete O'Hanlon17-Feb-08 23:01
mvePete O'Hanlon17-Feb-08 23:01 
GeneralRe: How to handle keypressevent Pin
Ravenet17-Feb-08 23:04
Ravenet17-Feb-08 23:04 
GeneralRe: How to handle keypressevent Pin
J4amieC18-Feb-08 0:31
J4amieC18-Feb-08 0:31 
GeneralRe: How to handle keypressevent Pin
Ravenet18-Feb-08 1:23
Ravenet18-Feb-08 1:23 
Questionhow to get no Pin
sugunavathy17-Feb-08 18:13
sugunavathy17-Feb-08 18:13 
AnswerRe: how to get no Pin
Christian Graus17-Feb-08 18:22
protectorChristian Graus17-Feb-08 18:22 
GeneralRe: how to get no Pin
sugunavathy17-Feb-08 18:34
sugunavathy17-Feb-08 18:34 
GeneralRe: how to get no Pin
Christian Graus17-Feb-08 18:35
protectorChristian Graus17-Feb-08 18:35 
GeneralRe: how to get no Pin
sugunavathy17-Feb-08 19:00
sugunavathy17-Feb-08 19:00 
GeneralRe: how to get no Pin
Christian Graus17-Feb-08 19:09
protectorChristian Graus17-Feb-08 19:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.