Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting Excel data as XML - Decimal separator

Status
Not open for further replies.

vjee

Programmer
Joined
Jan 16, 2002
Messages
23
Location
BE
Hi,

I'm having problems with the decimal separator when exporting Excel data to an XML-file.
I have a number of cells which I export to XML using a data map:
ActiveWorkbook.XmlMaps("exportmap_Map").Export URL:="d:export.xml", Overwrite:=true

Simple and clean...

The problem is the decimal separator. My local separator is a "," but the exported data has a "." as separator. Is there any way I can force the export to use the local decimal separator instead of the "."?
The reason is that this data needs to be imported into a Worddocument on the same PC and converting the value "0.02" to a number returns "2" instead of 0,02.

TIA,
Bart


Vjee
Component Developer
 
You may try something like this:
ActiveWorkbook.XmlMaps("exportmap_Map").PreserveNumberFormatting = True

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top