Click here to Skip to main content
16,005,120 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionPassing value through Querystring from Gridview record. Pin
codingrocks21-Apr-09 0:38
codingrocks21-Apr-09 0:38 
AnswerRe: Passing value through Querystring from Gridview record. Pin
N a v a n e e t h21-Apr-09 0:44
N a v a n e e t h21-Apr-09 0:44 
QuestionError opening Word Document in Asp.Net Pin
vyasdev200921-Apr-09 0:12
vyasdev200921-Apr-09 0:12 
AnswerRe: Error opening Word Document in Asp.Net Pin
Ashfield21-Apr-09 1:46
Ashfield21-Apr-09 1:46 
QuestionUnable to Fix The hight of Table cotrol in Report viewer (RDLC) Pin
Member 226432921-Apr-09 0:10
Member 226432921-Apr-09 0:10 
QuestionIIS and Tomcat Pin
jchandramouli20-Apr-09 22:46
jchandramouli20-Apr-09 22:46 
QuestionImport data from excel cell to Textbox Pin
samsonx20-Apr-09 21:58
samsonx20-Apr-09 21:58 
AnswerRe: Import data from excel cell to Textbox Pin
Greg Chelstowski21-Apr-09 0:28
Greg Chelstowski21-Apr-09 0:28 
If your spreadsheet is structured as a table in a database would be, you can use OleDb to connect to it, select the Column you want (select [column b] from $Sheet1), and then iterate through the collection to put stuff in the TextBox.

private void ConnectToExcel(string Location)
{
string ConnectionStr = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended properties=\"Excel 8.0;HDR=YES\"", Location);
            try
            {
                OleDbConnection Connection = new OleDbConnection(ConnectionStr);

                Connection.Open();
                           
                string SelectString = "select [column b] from $Sheet1";
                OleDbCommand Command = new OleDbCommand(SelectString, Connection);
                 OleDbDataReader olDbRead = Command.ExecuteNonQuery();

                while (olDbRead.Read)
                {
                    textBox1.Text += olDbRead[0].ToString();
                }

                
                
            }
            catch{}
            finally{Connection.Close();}
}



samsonx wrote:
Am using vb.net with c# language.

Well you lost me here...

var question = (_2b || !(_2b));

GeneralRe: Import data from excel cell to Textbox Pin
krishna_goluguri7-Jul-10 23:27
krishna_goluguri7-Jul-10 23:27 
QuestionUnable to cast COM object of type 'Word.ApplicationClass' to interface type 'Word._Application'. Pin
abyvjohnmca20-Apr-09 21:21
abyvjohnmca20-Apr-09 21:21 
QuestionHow we can fetch a textbox value when an enter key is pressed ? Pin
Masood Kochi,SSF20-Apr-09 21:15
Masood Kochi,SSF20-Apr-09 21:15 
AnswerRe: How we can fetch a textbox value when an enter key is pressed ? Pin
N a v a n e e t h20-Apr-09 21:57
N a v a n e e t h20-Apr-09 21:57 
AnswerRe: How we can fetch a textbox value when an enter key is pressed ? Pin
jai_10121-Apr-09 1:42
jai_10121-Apr-09 1:42 
Questionview html source code - asp.net Pin
Manish Thaduri20-Apr-09 20:35
Manish Thaduri20-Apr-09 20:35 
AnswerRe: view html source code - asp.net Pin
N a v a n e e t h20-Apr-09 20:39
N a v a n e e t h20-Apr-09 20:39 
General[Message Deleted] Pin
Manish Thaduri20-Apr-09 20:42
Manish Thaduri20-Apr-09 20:42 
GeneralRe: view html source code - asp.net Pin
N a v a n e e t h20-Apr-09 20:56
N a v a n e e t h20-Apr-09 20:56 
General[Message Deleted] Pin
Manish Thaduri20-Apr-09 21:06
Manish Thaduri20-Apr-09 21:06 
GeneralRe: view html source code - asp.net Pin
N a v a n e e t h20-Apr-09 22:19
N a v a n e e t h20-Apr-09 22:19 
Question[Message Deleted] Pin
Manish Thaduri20-Apr-09 22:45
Manish Thaduri20-Apr-09 22:45 
AnswerRe: view html source code - asp.net Pin
N a v a n e e t h20-Apr-09 23:46
N a v a n e e t h20-Apr-09 23:46 
JokeRe: view html source code - asp.net Pin
Ashfield21-Apr-09 1:50
Ashfield21-Apr-09 1:50 
QuestionSharepint connector Pin
Ch.Gayatri Subudhi20-Apr-09 20:20
Ch.Gayatri Subudhi20-Apr-09 20:20 
QuestionDisable the Back button from Browser Pin
sekannak20-Apr-09 19:59
sekannak20-Apr-09 19:59 
AnswerRe: Disable the Back button from Browser Pin
N a v a n e e t h20-Apr-09 20:05
N a v a n e e t h20-Apr-09 20:05 

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.