Congratulations to all monthly winners of May 2013 !!! They have won INR 2900 cash and INR 27497 worth prize.
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 13058 |  Welcome, Guest!   Register  Login
 Home > Coding Horrors > ASP.NET > Creating and writing XML file through C# ...
Mani5155

Creating and writing XML file through C#

 Coding Horror posted by: Mani5155 | Posted on: 4/12/2012 | Category: ASP.NET | Views: 2239 | Level: Starter | Status: [Member] | Points: 75 | Alert Moderator   



using Microsoft.Office.Core;
using Excel = Microsoft.Office.Interop.Excel;


        Excel.Application myExcelApp;
        Excel.Workbooks myExcelWorkbooks;
        Excel.Workbook myExcelWorkbook;


        object misValue = System.Reflection.Missing.Value;


myExcelApp = new Excel.ApplicationClass();
        myExcelApp.Visible = true;
myExcelWorkbooks = myExcelApp.Workbooks;
String fileName = "C:\\book1.xls"; \\ set this to your file you want
  myExcelWorkbook = myExcelWorkbooks.Open(fileName, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue, misValue);                 

Excel.Worksheet myExcelWorksheet = (Excel.Worksheet)myExcelWorkbook.ActiveSheet;
 
String cellFormulaAsString = myExcelWorksheet.get_Range("A2", misValue).Formula.ToString(); \\ this puts the formula in Cell A2 or text depending whats in it in the string.

myExcelWorksheetToChange.get_Range("C22", misValue).Formula = "New Value" \\ this changes the cell value in C2 to "New Value"



<iframe src="https://www.mcpvirtualbusinesscard.com/VBCServer/manivannanm/interactivecard"/>
Found interesting? Add this to:


About manivannan m

Experience:1 year(s)
Home page:http://www.dotnetfunda.com
Member since:Monday, April 09, 2012
Level:Starter
Status: [Member]
Biography:
 Responses
Anilbabu.M
Posted by: Anilbabu.M | Posted on: 8/2/2012 | Level: Starter | Status: [Member] | Points: 15 | Alert Moderator 

What is URL REDIRECTION?How can i use this concept in my .net?
my task is i have generated one url like this "http://example.com/"
I am passing one pearameter like "http://example.com/Empno=1"
I want to display Ename in Database table that corresponding "Empno"
plz Help me Give me one simple example

I am new this concepts
plz Help me send source code to my mailID:mandla.anilbabu@gmail.com

zzcc

>> Write Response - Respond to this post and get points

More Coding Horrors

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 6/19/2013 4:43:01 PM