tags:

views:

75

answers:

2

I am needing to rename an Excel worksheet that comes to us via FTP. The server the sheet resides on does not have Excel running on it so trying to script it via WSH and vbscript using Excel.Application is out of the question.

Is it possible to rename an Excel worksheet via OLE DB, ODBC or some other mechanism?

A: 

You don't need the Excel application to rename an Excel (.xls) file.

Or do you mean to rename a worksheet within a workbook?

Or create your vbscript that uses the Excel object model on a machine where it is available and pass it the full path to the file. Or you could fetch the file via another ftp onto the Excel enabled machine, rename it and ftp it back.

Dan Iveson
I need to rename a worksheet inside an Excel file.
b0fh
I would first try and run the renaming script remotely, passing the full path to it. If that didn't work then I would try to retrieve the file via FTP, rename the worksheet and FTP it back.Without knowing the exact internal representations of Excel files and data I don't think you can do it without Excel.
Dan Iveson
A: 

Just out of curiosity: Why do you need to rename the sheet? Is it ok to generate a new Excel file based on the contents of the old one? Can you alter the process that produces or consumes the file somehow?

The question What’s the best .NET library for parsing and generating Excel spreadsheets? seems to contain several pointers.

There are Perl modules for parsing and creating Excel files:Spreadsheet::ParseExcel, Spreadsheet::WriteExcel.

Anders Lindahl