How to delete column Data, not column from excel in c#? - c#

I want to delete column data from a particular column, not column , column number will be dynamic ..
suppose an excel has 10 columns , and if I give 3 as input then on button click it should delete column 3 data....same way input may be 1,2,3,4,5....
how to start with this, can any one please help me in this...

Related

Splitting csv strings and display it in different fields?

So basically I'm designing a report which can record name and amount of individuals. Now, I have no idea how to implement this on my cr report. But I need to split the csv strings and put all the splitted value as columns.
Here is my sample cell
I have 2 sample columns, Name and amounts. Both columns represent individual cell. Name is a single cell seperated by newline and same as amount.
In my desired output, I need to split all the values inside cell "Name" and put it in different column in Crystal Report and i also need to display the values of "Amount" Below the "Name". Which splitting is needed
Can this be theoretically be done? Any help is appreciated!
Thank You!
Yes, simply use the menu option of Insert, CrossTab... to insert a crosstab in the report header or footer.
Select Name as the column field.
Select Amount as the field to summarize.

Visual Studio Report - Show a table in two rows

i have a question: is there any way to show a single row of a table in two rows? The problem is that my table has too many fields and is too wide. So, I think that maybe you can split each row in the table to make it in a row. For example (my idea in Excel, just for example):
Complete table
...and my idea
I hope for your help!
You can:
add a Tablix with 4 columns and without header
add a Rectangle in every detail cell
add 4 TextBox for every Rectangle: use 2 TextBox as labels and two TextBox as values
increase Rectangle height in order to put spaces between every rows
Once you perform this operation for value 1 and 5, you can copy and paste Rectangle in the other 3 cells and simply change label and value.

How to display master-detail rows in Excel

Is it possible to display master-child rows in Excel using C#?
For example, the first row has two children, so there will be a plus sign. When the user clicks it, the children are displayed.
Yes, you can do this with Pivot Tables. http://office.microsoft.com/en-us/excel-help/expand-collapse-or-show-details-in-a-pivottable-or-pivotchart-report-HP010175905.aspx

How to Read a Specific Column of Excel and Update Related Values

Can you please let me know how I can use C# to read a specific column values base on the column header?
For example, let say I have a column with header "pAge" how I can loop into the column and update values for the specific rows related to the garbed values. What I want to do is looping in "pAge" column and find all ages over 50 then change the value of those rows in other column "Eligible" to "yes"
The reason that i would like to use the column header instead of column range is because I am getting some data from our clients which are not necessarily in the same order but they have always same name.
Thanks for your time
try using this linq to ecxel library it should help you achieve what you are looking for
http://code.google.com/p/linqtoexcel/

How to populate datagridview from a particular row?

Friends, I've a datagridview with 5 columns and 10 fixed rows. That means I've 5 columns with different fieldnames like(Id,FirstName,Middle Name,LastName,Age) and 10 rows with different field name like(City,State,Pin,Country,STDCode,PhoneNo,Mobile,Email,OtherContacts,Status). Now I want to populate this datagridviw with data from database using dataset/datatable. Can you suggest me, how will I start populating the grid say from position (1,0) or any other cell? Please help me regarding this.
In this case you can not use a DataBinding but need to insert data in the datagridview, row-by-row.
this link has an example on both techniques.

Categories

Resources