SaveAs matter: How can I save the worksheet on an external .xml keeping the .xls opened?

B

buonste

To start, hi everybody.

I have a request: I need to write down a macro to save an .xls
worksheet into XML format but (at the same time) I don't want that the
xml file became the new opened one.

Let me explain you a little bit better:
1 - I have a file called 'stefano.xls'
2 - with this macro...

strFileName = "c:\temp\stefano.xml"
ActiveWorkbook.SaveAs Filename:=strFileName,
FileFormat:=xlXMLSpreadsheet, ReadOnlyRecommended:=False,
CreateBackup:=False

....I'm able to save it onto XML format that I can use to update a web
page but (unfortunately) at this moment if I make any further
modification on my workskeet I do them on XML worksheet and not on
original .xls.

The request is:
How can I save the .xml on an external file but keeping the .xls
opened?

The request is infact to add a further piece of code to above macro in
order to connect via FTP to my site, update the file and come back to
original project.

I hope it's clear and I really thank everybody will help me!

Ciao!
Stefano, Milan, Italy
 
J

Jim Rech

I think you have to save it as XML, close it and open the original.

Or, save it as XML and then again as an XLS.

--
Jim
| To start, hi everybody.
|
| I have a request: I need to write down a macro to save an .xls
| worksheet into XML format but (at the same time) I don't want that the
| xml file became the new opened one.
|
| Let me explain you a little bit better:
| 1 - I have a file called 'stefano.xls'
| 2 - with this macro...
|
| strFileName = "c:\temp\stefano.xml"
| ActiveWorkbook.SaveAs Filename:=strFileName,
| FileFormat:=xlXMLSpreadsheet, ReadOnlyRecommended:=False,
| CreateBackup:=False
|
| ...I'm able to save it onto XML format that I can use to update a web
| page but (unfortunately) at this moment if I make any further
| modification on my workskeet I do them on XML worksheet and not on
| original .xls.
|
| The request is:
| How can I save the .xml on an external file but keeping the .xls
| opened?
|
| The request is infact to add a further piece of code to above macro in
| order to connect via FTP to my site, update the file and come back to
| original project.
|
| I hope it's clear and I really thank everybody will help me!
|
| Ciao!
| Stefano, Milan, Italy
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top