Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've been able to create an excel XML export function. The first line of the
file is <xml version="1.0" ?. The process works well except when some non-xml acceptable characters are used. The export is always fine, but when I view the xml file in any browser, the browser returns with errors. These errors are due to have unacceptable characters. Ugh! Are there any functions or method I can use to filter (replace) the bad characters as the xml file is written? Thanks, - Pat |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
An XML file is a text file so you can always do the replace AFTER the file
has been exported. To do the replacement wile it was saving would mean you would have to write you own routine to do the conversion to XML. Your other choice would be to create a copy of the workbook and make the replacements in the copy of the workbook before you saved. I think the copy method is the best solution. "Dreiding" wrote: I've been able to create an excel XML export function. The first line of the file is <xml version="1.0" ?. The process works well except when some non-xml acceptable characters are used. The export is always fine, but when I view the xml file in any browser, the browser returns with errors. These errors are due to have unacceptable characters. Ugh! Are there any functions or method I can use to filter (replace) the bad characters as the xml file is written? Thanks, - Pat |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Joel,
However I have to automate this capability so fixing this manually is out of the question. Do you know how I would fix the issues within the spreadsheet before exporting? Thanks. - Pat "Joel" wrote: An XML file is a text file so you can always do the replace AFTER the file has been exported. To do the replacement wile it was saving would mean you would have to write you own routine to do the conversion to XML. Your other choice would be to create a copy of the workbook and make the replacements in the copy of the workbook before you saved. I think the copy method is the best solution. "Dreiding" wrote: I've been able to create an excel XML export function. The first line of the file is <xml version="1.0" ?. The process works well except when some non-xml acceptable characters are used. The export is always fine, but when I view the xml file in any browser, the browser returns with errors. These errors are due to have unacceptable characters. Ugh! Are there any functions or method I can use to filter (replace) the bad characters as the xml file is written? Thanks, - Pat |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Had a small typo
Sub SaveXML() ActiveSheet.Copy Set NewSht = ActiveSheet Set NewBK = ActiveWorkbook fileSaveName = Application.GetSaveAsFilename( _ fileFilter:="XML Files (*.xml), *.xml") If fileSaveName = False Then MsgBox ("Cannot Save file - Exiting Macro") Exit Sub End If With NewSht.Cells .Replace "ABC", "DEF" .Replace ",", ";" .Replace "^", "$" End With NewBK.SaveAs _ Filename:=fileSaveName, _ FileFormat:=xlXMLSpreadsheet End Sub "Dreiding" wrote: Thanks Joel, However I have to automate this capability so fixing this manually is out of the question. Do you know how I would fix the issues within the spreadsheet before exporting? Thanks. - Pat "Joel" wrote: An XML file is a text file so you can always do the replace AFTER the file has been exported. To do the replacement wile it was saving would mean you would have to write you own routine to do the conversion to XML. Your other choice would be to create a copy of the workbook and make the replacements in the copy of the workbook before you saved. I think the copy method is the best solution. "Dreiding" wrote: I've been able to create an excel XML export function. The first line of the file is <xml version="1.0" ?. The process works well except when some non-xml acceptable characters are used. The export is always fine, but when I view the xml file in any browser, the browser returns with errors. These errors are due to have unacceptable characters. Ugh! Are there any functions or method I can use to filter (replace) the bad characters as the xml file is written? Thanks, - Pat |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 Sum question | Excel Discussion (Misc queries) | |||
Question on XML in Excel 2003 | Excel Discussion (Misc queries) | |||
Question for MVP - install Excel 2003 on MS Server 2003 | Setting up and Configuration of Excel | |||
excel 2003 question | Excel Worksheet Functions | |||
Excel 2003 VBA question | Excel Programming |