Click here to Skip to main content
12,289,975 members (71,172 online)

Web Development

 
QuestionDesigning WCF Pin
byka21-May-12 4:56
memberbyka21-May-12 4:56 
QuestionModal PopUp extender Pin
berba21-May-12 2:33
memberberba21-May-12 2:33 
AnswerRe: Modal PopUp extender Pin
Mickt198525-May-12 11:05
memberMickt198525-May-12 11:05 
AnswerRe: Modal PopUp extender Pin
Sandeep Mewara25-May-12 18:01
mvpSandeep Mewara25-May-12 18:01 
QuestionJohn Ray still relevant? (TCP/IP related) Pin
Mossmyr21-May-12 1:24
memberMossmyr21-May-12 1:24 
QuestionNot able to Ajax post knockout (KO) data in XML format Pin
Packer L20-May-12 6:38
memberPacker L20-May-12 6:38 
AnswerRe: Not able to Ajax post knockout (KO) data in XML format Pin
Packer L23-May-12 23:52
memberPacker L23-May-12 23:52 
Questiontigrina lexikon ትግርኛ መዝገብ ቃላት seglelet.com Pin
mululer19-May-12 22:27
membermululer19-May-12 22:27 
QuestionHow to display XML data using XSL in HTML? Pin
drajkulki18-May-12 1:35
memberdrajkulki18-May-12 1:35 
AnswerRe: How to display XML data using XSL in HTML? Pin
berba19-May-12 6:44
memberberba19-May-12 6:44 
QuestionProblem with Knockout mapping of observable array. Pin
Packer L18-May-12 0:04
memberPacker L18-May-12 0:04 
AnswerRe: Problem with Knockout mapping of observable array. Pin
Packer L18-May-12 20:07
memberPacker L18-May-12 20:07 
Questionhow can i bind data from excel file? Pin
heinhtataung16-May-12 23:09
memberheinhtataung16-May-12 23:09 
AnswerRe: how can i bind data from excel file? Pin
Mickt198519-May-12 21:36
memberMickt198519-May-12 21:36 
Hey they are 2 ways which you can achieve this. You can get the cell range and store it in an array and then read the values from the array like so :
this.openFileDialog1.FileName = "*.xls";
if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
{
Excel.Workbook theWorkbook = ExcelObj.Workbooks.Open(
openFileDialog1.FileName, 0, true, 5,
"", "", true, Excel.XlPlatform.xlWindows, "\t", false, false,
0, true);
Excel.Sheets sheets = theWorkbook.Worksheets;
Excel.Worksheet worksheet = (Excel.Worksheet)sheets.get_Item(1);
for (int i = 1; i <= 10; i++)
{
Excel.Range range = worksheet.get_Range("A"+i.ToString(), "J" + i.ToString());
System.Array myvalues = (System.Array)range.Cells.Value;
string[] strArray = ConvertToStringArray(myvalues);
TextBox.Text = strArray[0].ToString();
}
}
or you could use OleDb like so assuming you have a sheet in the excel file called MyObject :
OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Book1.xls;Extended Properties=Excel 8.0");
OleDbDataAdapter da = new OleDbDataAdapter("select * from MyObject", con);
DataTable dt = new DataTable();
da.Fill(dt);

Hope this helps


AnswerRe: how can i bind data from excel file? Pin
Mickt198525-May-12 11:08
memberMickt198525-May-12 11:08 
QuestionUse of Session states in SharePoint 2010 Pin
Athar Raza Faridi16-May-12 20:37
memberAthar Raza Faridi16-May-12 20:37 
QuestionMessage box with 3 buttons Yes/NO/Cancel in ASP.Net Pin
berba16-May-12 3:15
memberberba16-May-12 3:15 
AnswerRe: Message box with 3 buttons Yes/NO/Cancel in ASP.Net Pin
Sandeep Mewara16-May-12 7:38
mvpSandeep Mewara16-May-12 7:38 
QuestionEmails Sent by Window Service/C# Code are landing in spam in Gmail Pin
masterprogrammertech14-May-12 1:19
membermasterprogrammertech14-May-12 1:19 
AnswerRe: Emails Sent by Window Service/C# Code are landing in spam in Gmail Pin
Bernhard Hiller14-May-12 21:36
memberBernhard Hiller14-May-12 21:36 
QuestionSubpages are not found. Pin
m_kukulka10-May-12 3:03
memberm_kukulka10-May-12 3:03 
AnswerRe: Subpages are not found. Pin
Bernhard Hiller10-May-12 4:25
memberBernhard Hiller10-May-12 4:25 
QuestionWeb Crawling / Searching Pin
eddieangel9-May-12 6:08
membereddieangel9-May-12 6:08 
AnswerRe: Web Crawling / Searching Pin
Bernhard Hiller9-May-12 21:20
memberBernhard Hiller9-May-12 21:20 
QuestionFormat Date According to Regional Settings Pin
berba9-May-12 3:22
memberberba9-May-12 3:22 
AnswerRe: Format Date According to Regional Settings Pin
Richard MacCutchan9-May-12 4:31
mvpRichard MacCutchan9-May-12 4:31 
AnswerRe: Format Date According to Regional Settings Pin
David Mujica9-May-12 4:35
memberDavid Mujica9-May-12 4:35 
GeneralHow to write code for Admin approve ! Pin
heinhtataung8-May-12 18:26
memberheinhtataung8-May-12 18:26 
GeneralRe: How to write code for Admin approve ! Pin
David Mujica9-May-12 4:30
memberDavid Mujica9-May-12 4:30 
GeneralRe: How to write code for Admin approve ! Pin
heinhtataung10-May-12 21:00
memberheinhtataung10-May-12 21:00 
QuestionGenetic algorithm for class schedule with PHP Pin
Luki Dwiyanto7-May-12 19:14
memberLuki Dwiyanto7-May-12 19:14 
QuestionNew Drupal Based Website - Feedback Please Pin
sagedread6-May-12 17:45
membersagedread6-May-12 17:45 
AnswerRe: New Drupal Based Website - Feedback Please Pin
JohnPayton7-May-12 19:27
memberJohnPayton7-May-12 19:27 
GeneralRe: New Drupal Based Website - Feedback Please Pin
sagedread8-May-12 4:58
membersagedread8-May-12 4:58 
GeneralRe: New Drupal Based Website - Feedback Please Pin
Richard MacCutchan8-May-12 5:14
mvpRichard MacCutchan8-May-12 5:14 
GeneralRe: New Drupal Based Website - Feedback Please Pin
sagedread8-May-12 11:54
membersagedread8-May-12 11:54 
GeneralRe: New Drupal Based Website - Feedback Please Pin
Richard MacCutchan8-May-12 21:29
mvpRichard MacCutchan8-May-12 21:29 
Questionneed error solution Pin
Member 86003984-May-12 1:38
memberMember 86003984-May-12 1:38 
Questionspl_autoload Pin
AndyInUK2-May-12 23:41
memberAndyInUK2-May-12 23:41 
Questionhelp with creating a web based gambling game Pin
samcoode2-May-12 17:42
membersamcoode2-May-12 17:42 
GeneralHow can i connect with PayPal ? Pin
heinhtataung1-May-12 18:47
memberheinhtataung1-May-12 18:47 
GeneralRe: How can i connect with PayPal ? Pin
Richard MacCutchan1-May-12 21:33
mvpRichard MacCutchan1-May-12 21:33 
AnswerRe: How can i connect with PayPal ? Pin
ryanb312-May-12 10:33
memberryanb312-May-12 10:33 
QuestionWordPress Plugin Problem Pin
Darrall28-Apr-12 4:41
memberDarrall28-Apr-12 4:41 
AnswerRe: WordPress Plugin Problem Pin
Gerben Jongerius7-May-12 0:30
memberGerben Jongerius7-May-12 0:30 
GeneralRe: WordPress Plugin Problem Pin
Darrall14-May-12 6:31
memberDarrall14-May-12 6:31 
QuestionIncorrect Display Pin
GenJerDan27-Apr-12 11:26
memberGenJerDan27-Apr-12 11:26 
AnswerRe: Incorrect Display Pin
miyasudokoro27-Apr-12 17:25
membermiyasudokoro27-Apr-12 17:25 
GeneralRe: Incorrect Display Pin
GenJerDan28-Apr-12 14:00
memberGenJerDan28-Apr-12 14:00 
GeneralRe: Incorrect Display Pin
JohnPayton7-May-12 19:35
memberJohnPayton7-May-12 19:35 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160518.1 | Last Updated 24 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid