Click here to Skip to main content
15,896,118 members
Home / Discussions / C#
   

C#

 
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 
Questionweb automation Pin
T_Teef7-Jul-09 5:11
T_Teef7-Jul-09 5:11 
AnswerRe: web automation Pin
DoctorMick7-Jul-09 5:33
DoctorMick7-Jul-09 5:33 
QuestionRead Outlook Message from msg file Pin
sajan_f7-Jul-09 4:15
sajan_f7-Jul-09 4:15 
AnswerUrgent request Pin
Not Active7-Jul-09 4:32
mentorNot Active7-Jul-09 4:32 
QuestionDataReader data writing to Excel sheet - cells in different row Pin
Krishna Aditya7-Jul-09 3:13
Krishna Aditya7-Jul-09 3:13 

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.