Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to export the excel is not called book1?
Message
 
À
20/04/2011 02:28:49
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01507874
Message ID:
01507875
Vues:
48
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform