Click here to Skip to main content
15,887,386 members
Home / Discussions / C#
   

C#

 
Questionupdating the database with the edited value from the datagridview Pin
praveenkumar_vittaboina7-Jul-09 9:47
praveenkumar_vittaboina7-Jul-09 9:47 
AnswerRe: updating the database with the edited value from the datagridview Pin
Manas Bhardwaj7-Jul-09 10:12
professionalManas Bhardwaj7-Jul-09 10:12 
AnswerRe: updating the database with the edited value from the datagridview Pin
FilipKrnjic7-Jul-09 23:24
FilipKrnjic7-Jul-09 23:24 
QuestionC# accuracy probleb (double) Pin
shai sherman7-Jul-09 7:45
shai sherman7-Jul-09 7:45 
AnswerRe: C# accuracy probleb (double) Pin
Ennis Ray Lynch, Jr.7-Jul-09 8:08
Ennis Ray Lynch, Jr.7-Jul-09 8:08 
AnswerRe: C# accuracy probleb (double) Pin
harold aptroot7-Jul-09 8:23
harold aptroot7-Jul-09 8:23 
AnswerRe: C# accuracy probleb (double) Pin
Luc Pattyn7-Jul-09 8:27
sitebuilderLuc Pattyn7-Jul-09 8:27 
QuestionExcel Parseing Pin
guchu7-Jul-09 7:26
guchu7-Jul-09 7:26 
Excel.Application ExcelApp = new Excel.ApplicationClass();
ExcelApp.Visible = false;
String WorkbookPath = filename;
Excel.Workbook ExcelWorkbook = ExcelApp.Workbooks.Open(WorkbookPath, 0, false, 5, "", "", false, Excel.XlPlatform.xlWindows, "", true, false, 0, true, false, false);
Excel.Worksheet Sheet = (Excel.Worksheet)ExcelWorkbook.Sheets[1];
DataTable newTable = new DataTable();
string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filename + ";Extended Properties= Excel 8.0";
OleDbConnection conn = new OleDbConnection(strConn);
conn.Open();
OleDbCommand cmd = new OleDbCommand("SELECT * FROM [" + Sheet + "$]", conn);
cmd.CommandType = CommandType.Text;
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
da.Fill(newTable);
dataGridView1.DataSource = newTable;


I am using this code to read an excel file and save the data in a datatable ....
I am getting this error "System.__ComObject$' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long." and the error pointer comes on the second last line of the code ... can neone help
AnswerRe: Excel Parseing Pin
DarrenShultz7-Jul-09 8:21
DarrenShultz7-Jul-09 8:21 
GeneralRe: Excel Parseing Pin
guchu8-Jul-09 22:17
guchu8-Jul-09 22:17 
GeneralRe: Excel Parseing Pin
DarrenShultz9-Jul-09 5:18
DarrenShultz9-Jul-09 5:18 
QuestionEmail In C# Pin
kibromg7-Jul-09 5:41
kibromg7-Jul-09 5:41 
AnswerRe: Email In C# PinPopular
Christian Graus7-Jul-09 5:42
protectorChristian Graus7-Jul-09 5:42 
GeneralRe: Email In C# Pin
kibromg7-Jul-09 5:57
kibromg7-Jul-09 5:57 
GeneralRe: Email In C# Pin
Eddy Vluggen7-Jul-09 6:02
professionalEddy Vluggen7-Jul-09 6:02 
GeneralRe: Email In C# PinPopular
EliottA7-Jul-09 7:00
EliottA7-Jul-09 7:00 
GeneralRe: Email In C# Pin
Luc Pattyn7-Jul-09 8:39
sitebuilderLuc Pattyn7-Jul-09 8:39 
GeneralRe: Email In C# Pin
EliottA7-Jul-09 9:32
EliottA7-Jul-09 9:32 
GeneralRe: Email In C# Pin
Luc Pattyn7-Jul-09 12:06
sitebuilderLuc Pattyn7-Jul-09 12:06 
GeneralRe: Email In C# Pin
kibromg7-Jul-09 23:20
kibromg7-Jul-09 23:20 
QuestionTransparent Pictureboxes Pin
Jordanwb7-Jul-09 5:40
Jordanwb7-Jul-09 5:40 
AnswerRe: Transparent Pictureboxes Pin
Christian Graus7-Jul-09 5:43
protectorChristian Graus7-Jul-09 5:43 
GeneralRe: Transparent Pictureboxes Pin
Jordanwb7-Jul-09 5:49
Jordanwb7-Jul-09 5:49 
GeneralRe: Transparent Pictureboxes Pin
Christian Graus7-Jul-09 5:52
protectorChristian Graus7-Jul-09 5:52 
GeneralRe: Transparent Pictureboxes Pin
Luc Pattyn7-Jul-09 8:41
sitebuilderLuc Pattyn7-Jul-09 8:41 

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.