January 3, 2007 at 1:04 am
is it possible to rename a table in a linked server?
I woyuld like to know also is it possible to rename a Excel worksheet with Tsql
Thanks for your help
January 3, 2007 at 5:50 am
January 3, 2007 at 7:04 am
in dos command there no switch for renaming a worksheet
January 3, 2007 at 8:55 am
"in dos command there no switch for renaming a worksheet "
A worksheet isn't any different from any other file on the file system. Use REN/RENAME.
From DOS help -
C:\> REN /?
Renames a file or files.
RENAME [drive:][path]filename1 filename2.
REN [drive:][path]filename1 filename2.
Note that you cannot specify a new drive or path for your destination file.
January 3, 2007 at 9:09 am
i think i am maybe not clear enought
the goal is to rename the worksheet that is inside the workbook
example:
i have a workbook TEST.xls that have inside 2 worksheets
1)test1
2)test2
i would like to rename test1 to test3
thank you for your help
January 3, 2007 at 3:09 pm
As far as I know the only way to rename a worksheet in a workbook through code is to use the Excel API. Which I don't think you can do they way you are wanting to do this.
January 5, 2007 at 11:40 am
January 5, 2007 at 1:51 pm
Yes, you can rename a worksheet (inside a workbook) from SQL.
Lookup using sp_OACreate and related sprocs, and use the Excel Automation object to rename a worksheet.
Mark
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply