Click here to Skip to main content
15,895,142 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Advertising on my website Pin
Steve Echols10-Sep-06 20:06
Steve Echols10-Sep-06 20:06 
QuestionPlease help, a problem in creating ASP.NET Web Service Pin
Tamatem8-Sep-06 10:46
Tamatem8-Sep-06 10:46 
AnswerRe: Please help, a problem in creating ASP.NET Web Service Pin
Guffa10-Sep-06 21:02
Guffa10-Sep-06 21:02 
QuestionHow to convert any pritable file to TIFF/JPEG/PDF and Text formats? Pin
rajeshrevelli8-Sep-06 8:46
rajeshrevelli8-Sep-06 8:46 
AnswerRe: How to convert any pritable file to TIFF/JPEG/PDF and Text formats? Pin
Walter_H19-Sep-06 4:36
Walter_H19-Sep-06 4:36 
Questionis there any way i can update only some fields in the database excluding primary key ? please help Pin
bobolov8-Sep-06 8:34
bobolov8-Sep-06 8:34 
AnswerRe: is there any way i can update only some fields in the database excluding primary key ? please help Pin
Tushar Kothari11-Sep-06 0:45
Tushar Kothari11-Sep-06 0:45 
Questionhow to create a datatable from interop.excel.worksheet? Pin
qahwah8-Sep-06 7:56
qahwah8-Sep-06 7:56 
Is it possible to create a system.data.datatable or dataset from an excel worksheet that is obtained using interop.excel in C#?

The code is as following. As you can see, I can read/modify certain cell, but is it possible to convert the table to a System.data.datatable? Or at least print out the select range in the excelworksheet? Confused | :confused:

using System;
using Excel;

protected void OpenExcelSpreadSheet(string input)
{
Excel.Application excelApp = new Excel.ApplicationClass();
excelApp.Visible = false;
Excel.Workbook newWorkbook =
excelApp.Workbooks.Add(XlWBATemplate.xlWBATWorksheet);

// The following code opens an existing workbook
object Missing = System.Reflection.Missing.Value;
string workbookPath= "myFile.xls";
Excel.Workbook excelWorkbook =
excelApp.Workbooks.Open(workbookPath,Missing,Missing,Missing,
Missing,Missing,Missing,Missing,Missing,Missing,Missing,Missing,Missing,Missing,Missing);

// The following gets the Worksheets collection
Excel.Sheets excelSheets = excelWorkbook.Worksheets;

// The following gets Sheet1 for editing
string currentSheet = "Sheet1";
Excel.Worksheet excelWorksheet = (Excel.Worksheet)excelSheets.get_Item(currentSheet);

// The following gets cell A1 for editing
Excel.Range excelCell = (Excel.Range)excelWorksheet.get_Range("A1", "A1");
excelCell.Value2 = input;

Excel.Range excelTable = (Excel.Range)excelWorksheet.get_Range("A1", "A27");

int noOfRow = excelTable.Rows.Count;
int noOfColumn = excelTable.Columns.Count;
Response.Write("Table has " + noOfRow + " rows and " + noOfColumn + " columns.
");

}

QuestionFlat Files or Database Pin
Rod Cutler8-Sep-06 6:17
Rod Cutler8-Sep-06 6:17 
AnswerRe: Flat Files or Database Pin
Guffa8-Sep-06 6:59
Guffa8-Sep-06 6:59 
GeneralRe: Flat Files or Database Pin
qahwah8-Sep-06 8:01
qahwah8-Sep-06 8:01 
AnswerRe: Flat Files or Database Pin
Guffa8-Sep-06 8:52
Guffa8-Sep-06 8:52 
QuestionRe: Flat Files or Database Pin
qahwah8-Sep-06 8:58
qahwah8-Sep-06 8:58 
QuestionUnable to acces image after providing querystring params Pin
Sivaprasad C8-Sep-06 0:03
Sivaprasad C8-Sep-06 0:03 
QuestionCan we use web services in classical asp? Pin
Naveed Kamboh7-Sep-06 22:54
Naveed Kamboh7-Sep-06 22:54 
AnswerRe: Can we use web services in classical asp? Pin
RichardGrimmer8-Sep-06 3:01
RichardGrimmer8-Sep-06 3:01 
Questiontrying open a project in web dev express. Pin
uglyeyes7-Sep-06 19:57
uglyeyes7-Sep-06 19:57 
AnswerRe: trying open a project in web dev express. Pin
CWIZO7-Sep-06 21:45
CWIZO7-Sep-06 21:45 
GeneralRe: trying open a project in web dev express. Pin
uglyeyes10-Sep-06 15:40
uglyeyes10-Sep-06 15:40 
Questionrunning visual studio 1.1 and 2.0 in same server Pin
uglyeyes7-Sep-06 15:00
uglyeyes7-Sep-06 15:00 
QuestionIn ASP.NET/CSS make image go to top of table cell? Pin
LuluSailor7-Sep-06 6:21
LuluSailor7-Sep-06 6:21 
AnswerRe: In ASP.NET/CSS make image go to top of table cell? Pin
JUNEYT7-Sep-06 7:13
JUNEYT7-Sep-06 7:13 
AnswerRe: In ASP.NET/CSS make image go to top of table cell? Pin
RichardGrimmer8-Sep-06 3:03
RichardGrimmer8-Sep-06 3:03 
Questionsome help about arrays in javascript Pin
JUNEYT7-Sep-06 6:14
JUNEYT7-Sep-06 6:14 
AnswerRe: some help about arrays in javascript Pin
led mike7-Sep-06 8:21
led mike7-Sep-06 8:21 

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.