LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Open Excel with a XML file and SaveAs XLS

Hi,

I want to open Excel with a XML file and save back to a xls file, using the
following codes:
' Create the Excel App Object
Dim xlApp = CreateObject("Excel.Application")

' Create the Excel Workbook Object.
Dim xlBook = xlApp.Workbooks.Open("c:\temp\xx.xml")

' Set the value of the Cell
'xlBook.Worksheets(xlWorksheet).range(xlCellName). V(alue =
xlCellContents)

' Save changes and close the spreadsheet
xlBook.SaveAs("c:\temp\4.xls")

However "4.xls" is still a xml file but not a xls file. Anybody know that?
Thanks in advance
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
How can I make File-Save , File-SaveAs Menu disabled? Zoo Excel Programming 4 June 5th 06 06:58 AM
Keep original wkbk open after SaveAs? Ed Excel Programming 2 May 2nd 05 10:12 PM
VBA-Excel. File-SaveAs [email protected] Excel Programming 3 February 17th 05 08:42 AM
overwrite Excel SaveAs function from File menu susie Excel Programming 1 July 31st 03 04:47 AM


All times are GMT +1. The time now is 06:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"