Click here to Skip to main content
15,903,175 members
Home / Discussions / C#
   

C#

 
GeneralRe: Operator | | Pin
ctreed72823-Apr-09 15:17
ctreed72823-Apr-09 15:17 
GeneralRe: Operator | | Pin
Luc Pattyn23-Apr-09 15:21
sitebuilderLuc Pattyn23-Apr-09 15:21 
GeneralRe: Operator | | Pin
ctreed72823-Apr-09 16:14
ctreed72823-Apr-09 16:14 
QuestionRe: Operator | | Pin
CPallini23-Apr-09 21:45
mveCPallini23-Apr-09 21:45 
AnswerRe: Operator | | Pin
PIEBALDconsult24-Apr-09 4:01
mvePIEBALDconsult24-Apr-09 4:01 
Questionsending SMS from PC through USB port Pin
invisible_eagle23-Apr-09 12:43
invisible_eagle23-Apr-09 12:43 
AnswerRe: sending SMS from PC through USB port Pin
akyriako7824-Apr-09 1:45
akyriako7824-Apr-09 1:45 
QuestionReading from excel.. Pin
Jacob Dixon23-Apr-09 10:44
Jacob Dixon23-Apr-09 10:44 
I am having a strange issue with reading from Excel with C#

Here is my code:

string excelConnectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=Excel 8.0;", txtExcel.Text);

OleDbConnection con = new OleDbConnection(excelConnectionString);
con.Open();
OleDbDataAdapter da = new OleDbDataAdapter("select * from ["+ txtFY.Text +"$]", con);
fy.Text = txtFY.Text;

DataTable dt = new DataTable();
da.Fill(dt);

con.Close();

dataGridView1.DataSource = dt;
dataGridView1.Refresh();


Now it works.. its just some columns that have information in the "actual" excel sheet doesn't appear in the data grid view..

Example:

Here is a column (Serial Column):
136WFW7552
136WFW7556
136WFW7494
136WFW7553
136WFW7492
70101135
71000640
70202250
70101234
70101230


Now when the numbers go from 136WFW7492 to 70101135, it doesn't put the 70101135 numbers in the datagridview... I've removed formatting from the workboot and everything.. I'm confused
AnswerRe: Reading from excel.. [modified] Pin
fly90423-Apr-09 11:27
fly90423-Apr-09 11:27 
GeneralRe: Reading from excel.. Pin
Jacob Dixon24-Apr-09 13:38
Jacob Dixon24-Apr-09 13:38 
GeneralRe: Reading from excel.. Pin
fly90424-Apr-09 14:08
fly90424-Apr-09 14:08 
GeneralRe: Reading from excel.. Pin
fly90424-Apr-09 14:48
fly90424-Apr-09 14:48 
GeneralRe: Reading from excel.. Pin
Jacob Dixon24-Apr-09 14:50
Jacob Dixon24-Apr-09 14:50 
AnswerRe: Reading from excel.. Pin
Ashfield23-Apr-09 20:56
Ashfield23-Apr-09 20:56 
GeneralRe: Reading from excel.. Pin
Jacob Dixon24-Apr-09 13:38
Jacob Dixon24-Apr-09 13:38 
GeneralRe: Reading from excel.. Pin
Ashfield25-Apr-09 7:34
Ashfield25-Apr-09 7:34 
Questionhow to select mulitiple files for upload Pin
T_Teef23-Apr-09 10:10
T_Teef23-Apr-09 10:10 
AnswerRe: how to select mulitiple files for upload Pin
Christian Graus23-Apr-09 10:21
protectorChristian Graus23-Apr-09 10:21 
QuestionProcess.Start is eating spaces Pin
Miszou23-Apr-09 10:06
Miszou23-Apr-09 10:06 
AnswerRe: Process.Start is eating spaces Pin
fly90423-Apr-09 12:04
fly90423-Apr-09 12:04 
GeneralRe: Process.Start is eating spaces Pin
Miszou23-Apr-09 13:23
Miszou23-Apr-09 13:23 
GeneralRe: Process.Start is eating spaces Pin
fly90423-Apr-09 15:23
fly90423-Apr-09 15:23 
Questionurl issue Pin
Zafar Sultan23-Apr-09 7:18
Zafar Sultan23-Apr-09 7:18 
AnswerRe: url issue Pin
Christian Graus23-Apr-09 11:02
protectorChristian Graus23-Apr-09 11:02 
QuestionCannot connect into SQL Server using C# Pin
Gindi Bar Yahav23-Apr-09 6:46
Gindi Bar Yahav23-Apr-09 6:46 

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.