Can we copy a row from excel sheet to another excel sheet, keeping all the cell validations and formatting ?
Like,
NewWorkSheets[0].Rows[0] = WorkSheets[0].Rows[0];
Or do I have to do it manually ? copy value from each cell and all ???
Hello Vaishvnavi,
Thank you for posting in the community.
By design Rows collection of is a read only collection which means that values could not be assigned to items from this collection.
What I can suggest for achieving your requirement is is manually setting cell values. For example:
voWBook.Worksheets[1].GetCell("A1").Value = voWBook.Worksheets[0].GetCell("A1").Value;
I also made a small sample illustrating my suggestion and I am attaching it for your reference.
Some further reference about Infragistics Excel Engine could be found at:
http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=ExcelEngine_Using_the_Infragistics_Excel_Engine.html
Please let ne know if you need any further assistance with this matter.
Hi, Thank you for the help.
But I have few validations and cell formatting. So I have to do that also similar to this ?
voWBook.Worksheets[1].GetCell("A1").DataValidationRule= voWBook.Worksheets[0].GetCell("A1").DataValidationRule;
It would be nice if we could add the entire row at once.
Isnt that possible now ?
Also, can I delete a row from WorkSheet using infragistics ?
Hello Vaishvani,
Thank you for getting back to me.
As mentioned in my previous post the Rows collection is read only. This means that you could now directly delete a row. Alternatively, you could loop trough all the cells in the row and delete their values . If there is no cells with values in this row the whole row is going to be removed since the Excel keeps reference only about rows with at least one value.
What I can say regarding the data validation rules is that a rule defined in one worksheet could not be used in another worksheet. Basically, this means that you could not set the ValidationRule as mentioned in your post. Alternatively, you will have to clone the data validation rule and apply it again in the new worksheet.
Some further reference about the Excel Engine could be found at:
I hope you find my information helpful.
Want to know about Windows 7 Professional Product Key for 32/64 Bit, but don’t know how? Contact us
https://www.itechgyan.com/windows-7-professional-product-key-32-64-bit/ We will help you to solve your problems.
Hello Vaishavani,
Please let me know if you need any further assistance with this matter.
I believe you will find the following links form our documentation helpful for achieving your requirement:
http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=Infragistics4.WebUI.Documents.Excel.v14.2~Infragistics.Documents.Excel.WorksheetRowCollection~Insert.html
http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=Infragistics4.WebUI.Documents.Excel.v14.2~Infragistics.Documents.Excel.WorksheetRowCollection~Remove.html
http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=Infragistics4.WebUI.Documents.Excel.v14.2~Infragistics.Documents.Excel.WorksheetColumnCollection~Insert.html
http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=Infragistics4.WebUI.Documents.Excel.v14.2~Infragistics.Documents.Excel.WorksheetColumnCollection~Remove.html
http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=Infragistics4.WebUI.Documents.Excel.v14.2~Infragistics.Documents.Excel.Worksheet~DeleteCells.html
http://help.infragistics.com/doc/ASPNET/2014.2/CLR4.0/?page=Infragistics4.WebUI.Documents.Excel.v14.2~Infragistics.Documents.Excel.Worksheet~InsertCells.html
Also if you would like to see any additional functionality implemented in the future versions of our controls I can suggest you logging a new product idea on our product ideas web site: http://ideas.infragistics.com
There are many benefits to submitting a product idea:
- Direct communication with our product manager team regarding your product idea
- Notifications whenever new information regarding your ide becomes available
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you
- Allow you to shape the future of our products by requesting new controls and products altogether
- You and other developers can discuss existing product ideas with the member of our Product Management team
Steps to crate your idea:
1. Log into the Infragistics Product Idea site at http://ideas.infragistics.com (creating a new login if needed).
2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
3. Add your product idea and be sure to be specific and provide as much detail as possible.
Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you
Thank you for choosing Infragistics.