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

C#

 
AnswerRe: Unix Time Pin
PIEBALDconsult31-May-10 5:25
mvePIEBALDconsult31-May-10 5:25 
Questionignore special chars in string Pin
michaelgr130-May-10 7:11
michaelgr130-May-10 7:11 
AnswerRe: ignore special chars in string Pin
Hamed Musavi30-May-10 7:14
Hamed Musavi30-May-10 7:14 
AnswerRe: ignore special chars in string Pin
Abhinav S30-May-10 7:31
Abhinav S30-May-10 7:31 
GeneralRe: ignore special chars in string Pin
yu-jian30-May-10 15:06
yu-jian30-May-10 15:06 
AnswerRe: ignore special chars in string Pin
Abhinav S30-May-10 18:25
Abhinav S30-May-10 18:25 
GeneralRe: ignore special chars in string Pin
yu-jian31-May-10 1:38
yu-jian31-May-10 1:38 
QuestionCopy Excel columns or rows into an Array in C sharp programme Pin
Kutilya30-May-10 0:47
Kutilya30-May-10 0:47 
Hi I'm new to OOP so having lots of trouble trying to do simple things. I have an Excel file that has data in one of its sheets and I want to to copy 2 (or more) columns and 400 rows of that data into an Array which will reside in a C Sharp programme.

I've built individual Arrays for the 2 columns and have also managed to read the Excel file but I can't seem to get them to populate my Array. I can read Text files as well but I can't seem to able to put them in an Array especially if its multidimensional and has not string and double

any thoughts would be much appreciated.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


public static void Main()
{
string [] Pat = new string[400];
double[] Data = new double[400];
//int contents = 0;
string[] range = new string[6];

Excel._Application app = new Excel.Application();
Excel.Workbook small1 = app.Workbooks.Open(@"C:\Users\Worc\Desktop\small.xls");
Excel.Worksheet sheet1 = Excel.Worksheets.Equals(small1.Worksheets[1]);
Excel.Range r = sheet1.Columns;
Excel.Range r = sheet1.get_Range("B2:B400");

//for(int i = 0; i < sheet1.Range; i++)
//{
//
//}

Console.WriteLine("Value, {r}" , r);
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
hi

AnswerRe: Copy Excel columns or rows into an Array in C sharp programme Pin
Garth J Lancaster30-May-10 1:33
professionalGarth J Lancaster30-May-10 1:33 
AnswerRe: Copy Excel columns or rows into an Array in C sharp programme Pin
Richard MacCutchan30-May-10 1:57
mveRichard MacCutchan30-May-10 1:57 
QuestionCrystal Report Giving Error At Runtime Pin
Sanket.Patil29-May-10 23:30
Sanket.Patil29-May-10 23:30 
AnswerRe: Crystal Report Giving Error At Runtime Pin
Abhinav S29-May-10 23:57
Abhinav S29-May-10 23:57 
GeneralRe: Crystal Report Giving Error At Runtime Pin
Sanket.Patil30-May-10 0:11
Sanket.Patil30-May-10 0:11 
GeneralRe: Crystal Report Giving Error At Runtime Pin
Abhinav S30-May-10 3:02
Abhinav S30-May-10 3:02 
QuestionOOPS Pin
NetQuestions29-May-10 21:43
NetQuestions29-May-10 21:43 
AnswerRe: OOPS Pin
Richard MacCutchan29-May-10 21:45
mveRichard MacCutchan29-May-10 21:45 
AnswerRe: OOPS Pin
Md. Marufuzzaman29-May-10 22:40
professionalMd. Marufuzzaman29-May-10 22:40 
AnswerRe: OOPS Pin
Abhinav S29-May-10 23:13
Abhinav S29-May-10 23:13 
AnswerRe: OOPS PinPopular
Luc Pattyn30-May-10 2:47
sitebuilderLuc Pattyn30-May-10 2:47 
GeneralRe: OOPS Pin
NetQuestions1-Jun-10 20:06
NetQuestions1-Jun-10 20:06 
QuestionHow to write a utf8 string in a unicode text file using c#? Pin
svt gdwl29-May-10 18:49
svt gdwl29-May-10 18:49 
AnswerRe: How to write a utf8 string in a unicode text file using c#? Pin
Abhinav S29-May-10 21:15
Abhinav S29-May-10 21:15 
AnswerRe: How to write a utf8 string in a unicode text file using c#? Pin
Luc Pattyn30-May-10 2:06
sitebuilderLuc Pattyn30-May-10 2:06 
QuestionDisplay multiple images Pin
ruknil29-May-10 7:49
ruknil29-May-10 7:49 
AnswerRe: Display multiple images Pin
Luc Pattyn29-May-10 10:07
sitebuilderLuc Pattyn29-May-10 10:07 

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.