|
How can I hide columns and rows in a excel sheet?
Please give me with code examples.
Thanks!
|
|
|
|
|
Hi....
The code will look like
Range usedRng1 = (Range)_ExcByAppWorkSheet.get_Range("A1", Type.Missing).Select();<br />
usedRng1.EntireColumn.Hidden = true;
Regards,
Sandeep Kumar.V
|
|
|
|
|
thanks! it works
Range range = (Range)WorkSheet.get_Range("A1", Missing.Value);
range.EntireColumn.Hidden = true;
....
range.EntireRow.Hidden = true;
modified on Friday, December 24, 2010 9:12 AM
|
|
|
|
|
I want to put a date into a field of a GridView bound Access table. Really I can't get any type of data to work, the field is a VarChar. I tried the following with the UpdateCommand...
[Lastupd] = @DateLabel,
<UpdateParameters>
<asp:ControlParameter ControlID="DateLabel" Name="DateLabel" PropertyName="Text" />
</UpdateParameters>
Nothing even displays in the GridView with this Update Parameter
I also tried this in the GridView1_RowCommand method...
GridView1.Rows[index].Cells[17].Text = "1";
and this gives me a "Data type mismatch in criteria expression" Only the .Text property is exposed and not .Value in any of the public methods of the DataView control.
|
|
|
|
|
i have a number series as follows
1..2..3..4..5..6..7..8..9
(there are two dots between the numbers,dot can also be any special charater or space)
i want 1 to be assigned to a[0];
2 to a[1],
3 to a[2],............
can you help me to solve this problem...
ganesh
|
|
|
|
|
This is a trivial homework assignment. Have you looked through the methods on the string class and considered which ones would help you to achieve this ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
split method help me to solve the problem with one dot between the numbers..
but i couldnt solve it with two dots between them..
also..plz suggest me some other method other than split..
ganesh
|
|
|
|
|
Ganesh RV wrote: split method help me to solve the problem with one dot between the numbers..
but i couldnt solve it with two dots between them..
What if you could replace all double dots with single dots?
/ravi
|
|
|
|
|
that works..
but plz suggest me some other way to do this...
ganesh
|
|
|
|
|
You haven't specified if you want the result as characters or strings. You can use the Chars collection to access individual characters in the string, and you can use the Substring method to get a part of the string.
---
single minded; short sighted; long gone;
|
|
|
|
|
A regex should be the easiest way to do this:
((\d+)[^\d]+)+
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Or even more simple:
string[] numbers = Regex.Split(mystring, "[^\d]+");
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi,
I'm trying to build a application for managing sales of a store.
I need a control that i could add lines to a bill just like a Data-Grid, I cant use a datagrid because it is too ugly. does any one have any ideas?
Is there ant where in CodeProject any samples for that?
Thanks.
|
|
|
|
|
If you can pay(or not) you can use Infragistics...
Visit my blog at http://dotnetforeveryone.blogspot.com/
|
|
|
|
|
I recently was watching a video about C# and came across a great shortcut. Inside a class if you type "prop" and then press [TAB][TAB] a property generator is created right in the code for you. I find this very cool and time saving when creating a lot of properties for a class. I was wondering if there are any cool little short cuts out there???
Chris
|
|
|
|
|
They are called "snippets" and intellisence will show you those that are available. You can also create your own.
|
|
|
|
|
Have a look at the following MS VS2005 Code Snippets[^] You will pretty much find a snippet in this collection for all your needs.
|
|
|
|
|
Hey guys and girls, I have a question that might sound stupid, but
I cant find a solution to it, so I am asking you.
I want to name my variables on the fly, meaning, I only know in the middle of the run, how
many variables to create and therefor I want to run inside a loop and create in each iteration,
a new variable with a different name.
example:
foreach (long EUI in EUIarray)
{
List<Object> EUI = new List<Object>();
}
Imagen that I want to create in each iteration EUI_1, EUI_2 etc.
thanks for your help
|
|
|
|
|
I'm pretty sure you can't, but why would you need to do that? Whats wrong with just using an array?
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
I am trying to create a few arrays, not just one.
I have some data in a buffer. this data belongs to different hardware units.
I want to create a separate array for each unit so I can later on approach this relevant data.
Any way I really need to be able to name these array's on the fly, like in my post
because I don't know how many I need from the start.
Maybe there is some way to append a number to the variable name(I know it sounds odd).
if not, maybe another suggestion that gives me the same result in the end of the day.
I need to have a different array of data for each unit so I can create a separate graph for each.
|
|
|
|
|
Can't be done. As someone else said, create a list of lists, if that's what you want.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
but a list of lists don't do the trick since i need to identify my relevant list by
the EUI number, and the list it self holds object type(referencing an internal type).
they cant sit in the same array.
I need a solution in which I can access the relevant list for a specific EUI.
|
|
|
|
|
Well, I'm sorry, but what you want to do, can't be done reasonably. The usual way around this is to create a dictionary, whch allows you to specify names by which to find your associated items, which are presumably lists. However, given that the names are being made up anyhow, I don't see any benefit in not using the index you intended to make a suffix as an index into an array directly.
If the EUI number is not just a sequence, if it could be any number, then a dictonary solves that problem.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
that's right you understand me, the EUI is a long type number, and it's not just a sequence.
this dictionary you are talking about I am not quite familiar with it.
I will take up some reading about the dictionary.
thank you very much.
|
|
|
|
|
A dictionary is an associative container. So, you define two types, one is the type of the key, the other is the type of the value. I'm imagining something like this:
Dictionary<int, List<Object>>
Then, the trick is, you can look up your list like this:
List<Object> items = myDict[EUI];
The main thing is, when you add your first item for a given EUI, that is, when you're adding and the key does not exist, you need to do this:
myDict[EUI] = new List<Object>()
as it will start as null. Then you can add items like this:
myDict[EUI].Add(item);
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|