Are you a VB programmer and learning C# and wondering How to do a newline in c#?
System.Environment.NewLine
Simple method to load data from Excel File
OleDbDataReader dr;
string strConnectionString = string.Empty;
strConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strFilePath + @";Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1""";
OleDbConnection cnCSV = new OleDbConnection(strConnectionString);
cnCSV.Open();
OleDbCommand cmdSelect = new OleDbCommand(@"SELECT * FROM [Sheet1$]", cnCSV);
1. Open Notepad / TextEditor and Type:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt]
@="Command Prompt"
[HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\Command]
@="cmd.exe /k cd %1"
2. Save the text as command.reg
3. Double Click the file to add the code to registry.
Click here to download the file.
(Save your time to do something else, or watching youtube *_^)