Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Urgent ! CSV double quotation problem ?

Dear All,

I need to write a Marco to export some data from an excel file to a new
CSV file. Some data with double quotation mark will export to CSV file.

For example, I need to export a column name with "ABC", my code is

sheet1.cells(1,4).value = """ABC"""
.......
oWorkbook.save

If I open the CSV file by using Excel, the cell display "ABC", so it is
correct. But when I use notepad to open the CSV file. It displays """ABC""",
it is not my target format.

I would like to ask how can I change my code to display "ABC" (both Excel
and Notepad).

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Urgent ! CSV double quotation problem ?

kobeting,
Notepad merely displays the text it finds in a file. It has no concept of
..csv.
Excel attempts parsing of the structure. In this case .csv, with different
data types (number, text, etc) and splitting the data into columns on the
commas etc.

So the quick answer is you cannot.

NickHK

"kobeting" wrote in message
...
Dear All,

I need to write a Marco to export some data from an excel file to a new
CSV file. Some data with double quotation mark will export to CSV file.

For example, I need to export a column name with "ABC", my code is

sheet1.cells(1,4).value = """ABC"""
.......
oWorkbook.save

If I open the CSV file by using Excel, the cell display "ABC", so it is
correct. But when I use notepad to open the CSV file. It displays

"""ABC""",
it is not my target format.

I would like to ask how can I change my code to display "ABC" (both

Excel
and Notepad).

Thanks



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CELL return value without double quotation marks Rui Gomes Excel Worksheet Functions 1 November 14th 07 10:40 PM
Excel CSV file: How to preserve double quotation mark on Unix ftp? Shannona Excel Discussion (Misc queries) 2 October 3rd 06 07:54 PM
double quotation marked tikchye_oldLearner57 Excel Discussion (Misc queries) 2 August 20th 06 07:44 AM
Single or Double Quotation Mark and it comes up twice J.R.HOLMES Setting up and Configuration of Excel 1 December 31st 05 08:51 PM
How to include a double quotation character in a string? Georgee Excel Programming 2 August 17th 04 06:41 AM


All times are GMT +1. The time now is 06:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"