ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   open new excel sheet (https://www.excelbanter.com/excel-programming/310196-open-new-excel-sheet.html)

No Name

open new excel sheet
 
hello,

i'm coding in .net visual c#... how do i open a new excel
spreadsheet and write some strings to it?

No Name

open new excel sheet
 
You'll have to know how to convert the VBA to C#;


CreateObject Function Example
This example uses the CreateObject function to set a
reference (xlApp) to Microsoft Excel. It uses the
reference to access the Visible property of Microsoft
Excel, and then uses the Microsoft Excel Quit method to
close it. Finally, the reference itself is released.

Dim xlApp As Object ' Declare variable to hold the
reference.

Set xlApp = CreateObject("excel.application")
' You may have to set Visible property to True
' if you want to see the application.
xlApp.Visible = True
' Use xlApp to access Microsoft Excel's
' other objects.
xlApp.Quit ' When you finish, use the Quit method to
close
Set xlApp = Nothing ' the application, then release the
reference.





-----Original Message-----
hello,

i'm coding in .net visual c#... how do i open a new excel
spreadsheet and write some strings to it?
.



All times are GMT +1. The time now is 10:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com