Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Naming A Worksheet
Hello,
In VB.net I am creating a CSV File. With Excel ..SheetsInNewWorkbook = 1 ..Workbooks.Add(1) ..Worksheets().Select() (Create Columns and Rows) When I save the file. ..Application.DisplayAlerts = False ..ActiveWorkbook().SaveAs("C:\MyCSV.csv", ..ActiveWorkbook.FileFormat.xlCSVWindows) ..ActiveWorkbook.Close() The worksheet is named MyCSV, I want the worksheet to have a different name than the saved file. Any assistance will be greatly appreciated. Thanks, Chuck |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Naming A Worksheet
You can change the name of the worksheet. But I wouldn't bother. The next time
you open the .CSV file, excel will use what it wants for the worksheet name--usually the name of that .csv file (without the .csv file extension). So it's not your saving that's the problem. It's the reopening. Since .csv files are plain old text, there's nothing you can do with the file itself. You can always rename the worksheet after the file is reopened. "Charles A. Lackman" wrote: Hello, In VB.net I am creating a CSV File. With Excel .SheetsInNewWorkbook = 1 .Workbooks.Add(1) .Worksheets().Select() (Create Columns and Rows) When I save the file. .Application.DisplayAlerts = False .ActiveWorkbook().SaveAs("C:\MyCSV.csv", .ActiveWorkbook.FileFormat.xlCSVWindows) .ActiveWorkbook.Close() The worksheet is named MyCSV, I want the worksheet to have a different name than the saved file. Any assistance will be greatly appreciated. Thanks, Chuck -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
naming worksheet tabs | Excel Discussion (Misc queries) | |||
Worksheet naming | Excel Discussion (Misc queries) | |||
Naming worksheet | Excel Programming | |||
Naming Worksheet | New Users to Excel | |||
Naming a worksheet help? | Excel Worksheet Functions |