Click here to Skip to main content
15,894,410 members
Home / Discussions / C#
   

C#

 
GeneralRe: delete temp files Pin
Dave Kreskowiak23-Mar-04 1:50
mveDave Kreskowiak23-Mar-04 1:50 
GeneralRe: delete temp files Pin
Heath Stewart23-Mar-04 3:57
protectorHeath Stewart23-Mar-04 3:57 
GeneralRe: delete temp files Pin
Dave Kreskowiak23-Mar-04 4:29
mveDave Kreskowiak23-Mar-04 4:29 
GeneralRe: delete temp files Pin
Heath Stewart23-Mar-04 4:50
protectorHeath Stewart23-Mar-04 4:50 
GeneralRe: delete temp files Pin
Dave Kreskowiak23-Mar-04 5:20
mveDave Kreskowiak23-Mar-04 5:20 
GeneralRe: delete temp files Pin
Heath Stewart23-Mar-04 5:22
protectorHeath Stewart23-Mar-04 5:22 
GeneralRe: delete temp files Pin
Dave Kreskowiak23-Mar-04 5:29
mveDave Kreskowiak23-Mar-04 5:29 
GeneralC# Excel Sheet Reading Problems Pin
MeMyselfAndDotNet22-Mar-04 20:42
MeMyselfAndDotNet22-Mar-04 20:42 
Hello

I have to read an excel sheet from asp.net using C#.i do hold a code minus using the Excel Object.
This is my code..
What i need to know from the following code is that The Sheet1$ which i am querying from need not go always under the name Sheet1$.i need to find a way to read the Excel Sheet Tab Names instead of referring them by hardcoding as Sheet1$
Kindly advise.itz very urgent.

string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + Server.MapPath("./") + "\\uploadedfiles\\Fortek CIS1.xls;Extended Properties=Excel 8.0;";

System.Data.OleDb.OleDbDataAdapter myData=new System.Data.OleDb.OleDbDataAdapter("SELECT * FROM [Sheet1$]", strConn);
myData.TableMappings.Add("Table", "Fortek CIS1");
DataSet myDataset=new DataSet();
myData.Fill(myDataset);

int j=0;
while (myDataset.Tables[0].Rows.Count>0)
{
if (j==43)
break;
Response.Write(myDataset.Tables[0].Rows[j+1]["name"] + "---------");
Response.Write(myDataset.Tables[0].Rows[j+1]["dept"] + "
");
j=j+1;
}
GeneralRe: C# Excel Sheet Reading Problems Pin
Heath Stewart23-Mar-04 4:04
protectorHeath Stewart23-Mar-04 4:04 
GeneralGetting the exe path Pin
SatyaDY22-Mar-04 20:08
SatyaDY22-Mar-04 20:08 
GeneralRe: Getting the exe path Pin
partyganger22-Mar-04 20:24
partyganger22-Mar-04 20:24 
GeneralRe: Getting the exe path Pin
SatyaDY22-Mar-04 21:03
SatyaDY22-Mar-04 21:03 
GeneralRe: Getting the exe path Pin
hazzem elrefai22-Mar-04 21:09
hazzem elrefai22-Mar-04 21:09 
GeneralRe: Getting the exe path Pin
SatyaDY22-Mar-04 21:41
SatyaDY22-Mar-04 21:41 
GeneralRe: Getting the exe path Pin
Dave Kreskowiak23-Mar-04 1:58
mveDave Kreskowiak23-Mar-04 1:58 
GeneralRe: Getting the exe path Pin
Heath Stewart23-Mar-04 4:15
protectorHeath Stewart23-Mar-04 4:15 
GeneralRe: Getting the exe path Pin
Sascha Andres25-Mar-04 11:02
Sascha Andres25-Mar-04 11:02 
GeneralUser control automatically resized when the parent form is sized in C# Pin
jayakarthikeyan22-Mar-04 18:42
jayakarthikeyan22-Mar-04 18:42 
GeneralRe: User control automatically resized when the parent form is sized in C# Pin
Dave Kreskowiak23-Mar-04 1:59
mveDave Kreskowiak23-Mar-04 1:59 
GeneralRe: User control automatically resized when the parent form is sized in C# Pin
jayakarthikeyan23-Mar-04 3:31
jayakarthikeyan23-Mar-04 3:31 
GeneralRe: User control automatically resized when the parent form is sized in C# Pin
Dave Kreskowiak23-Mar-04 3:55
mveDave Kreskowiak23-Mar-04 3:55 
GeneralRe: User control automatically resized when the parent form is sized in C# Pin
jayakarthikeyan26-Mar-04 2:45
jayakarthikeyan26-Mar-04 2:45 
GeneralRe: User control automatically resized when the parent form is sized in C# Pin
Heath Stewart23-Mar-04 4:17
protectorHeath Stewart23-Mar-04 4:17 
GeneralChoosing The Right Design Pattern Pin
sixefftee22-Mar-04 18:14
sixefftee22-Mar-04 18:14 
Questionaccess to Win32Native class? Pin
Ray Gregory22-Mar-04 15:48
Ray Gregory22-Mar-04 15:48 

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.