From Excel to C#
-
Let's say I have five sheets in excel workbook,and each sheet contains one table.Is there any way to Import only active sheet to my C#,What should I do to recognize only active sheet.??any help,ideas?? One more thing,How can I get a data to C# from Excel VBA control(let's say textbox). So I have vba control textbox in sheet and, I want to get textBox.value in my c# project??
-
Let's say I have five sheets in excel workbook,and each sheet contains one table.Is there any way to Import only active sheet to my C#,What should I do to recognize only active sheet.??any help,ideas?? One more thing,How can I get a data to C# from Excel VBA control(let's say textbox). So I have vba control textbox in sheet and, I want to get textBox.value in my c# project??
-
Let's say I have five sheets in excel workbook,and each sheet contains one table.Is there any way to Import only active sheet to my C#,What should I do to recognize only active sheet.??any help,ideas?? One more thing,How can I get a data to C# from Excel VBA control(let's say textbox). So I have vba control textbox in sheet and, I want to get textBox.value in my c# project??
-
Let's say I have five sheets in excel workbook,and each sheet contains one table.Is there any way to Import only active sheet to my C#,What should I do to recognize only active sheet.??any help,ideas?? One more thing,How can I get a data to C# from Excel VBA control(let's say textbox). So I have vba control textbox in sheet and, I want to get textBox.value in my c# project??
I dunno, I use ADO.net and the OleDb connector to read and write Excel and I don't think it will do everything you want.
-
I dunno, I use ADO.net and the OleDb connector to read and write Excel and I don't think it will do everything you want.
-
About first question you asked, you can include MS office excel object libraryand write:
Excel.Worksheet workSheet = (Excel.Worksheet)workBook.ActiveSheet;
Not sure about second requirement.
I did what u said,but nutin.Every time I get Sheet1 open.
-
I did what u said,but nutin.Every time I get Sheet1 open.
IIRC there are about 5 different ways of opening a sheet/book/etc. You need to find some samples and work out which method you need. This generally takes a load of reaserch into articles and samples etc.
Never underestimate the power of human stupidity RAH