Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to export the excel is not called book1?
Message
 
To
20/04/2011 02:28:49
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01507874
Message ID:
01507875
Views:
47
>Hi all,
> i write a export excel function, i want to exported the excel not call book1 , how can i do to change the excel file name ?
>i mean change the Workbooks.name thank you ~~~
>
>
>
>Dim XL As Excel.Application
>Dim WB As Excel.Workbook
>Dim Sheet As Excel.Worksheet
>
>
>
>                XL = CreateObject("Excel.Application")
>                XL.Visible = True
>
> 
>
>                WB = XL.Workbooks.Add
>                Sheet = WB.ActiveSheet
>
>
>XL.Visible = True
>
>                XL.UserControl = True
>
>                Sheet = Nothing
>
>                WB = Nothing
>
>                XL = Nothing
>
XL.ActiveWorkbook.SaveAs(path and name of the file, Format Of The File)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform