Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XL: Exported Comma Separated File Ignores Regional Settings


View products that this article applies to.

Symptoms

When you use a Microsoft Visual Basic for Applications (VBA) macro to save a Comma-separated values (.csv) file, Excel ignores the Microsoft Windows regional setting for the List separator character.

↑ Back to the top


Cause

Excel uses the default U.S. regional settings when running a macro. This behavior ensures that the result of running macro code is consistent regardless of the computer's regional settings.

Because the default separator character in English (U.S.) is a comma, Excel uses a comma as the separator.

↑ Back to the top


Workaround

If you need .csv files to be separated according to the regional settings, click Save As on the File menu to save the file manually.

↑ Back to the top


Keywords: KB288839, kbprb

↑ Back to the top

Article Info
Article ID : 288839
Revision : 6
Created on : 1/31/2007
Published on : 1/31/2007
Exists online : False
Views : 273