ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SaveAs matter: How can I save the worksheet on an external .xml keeping the .xls opened? (https://www.excelbanter.com/excel-programming/395166-saveas-matter-how-can-i-save-worksheet-external-xml-keeping-xls-opened.html)

buonste

SaveAs matter: How can I save the worksheet on an external .xml keeping the .xls opened?
 
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


Jim Rech

SaveAs matter: How can I save the worksheet on an external .xml keeping the .xls opened?
 
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
"buonste" wrote in message
oups.com...
| 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
|




All times are GMT +1. The time now is 05:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com