Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
SR SR is offline
external usenet poster
 
Posts: 18
Default csv to xls - data format

Hi

I have .csv files to be opened in xls format make few corrections on the
data or number fields and save it back as .csv file.

problems:
1.when I open the .csv file as .xls, the date and numeric fields do not
match the data of .csv file. I assume it has been converted to the default
settings of the excel sheet.
2. after corrections are made, I want to save the file back to .csv file

I have never written a macro. So can one of you help.

Shanti
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default csv to xls - data format

Rename the .csv file to .txt
start a new workbook
record a macro when you open the file--specify the correct date format for each
date field.
keep recording when you're updating the file--if your updates are all the same
save the workbook as a .csv file
stop recording

When you want to convert another file, just rerun that macro (remembering to
rename the .csv file to .txt before you start).

SR wrote:

Hi

I have .csv files to be opened in xls format make few corrections on the
data or number fields and save it back as .csv file.

problems:
1.when I open the .csv file as .xls, the date and numeric fields do not
match the data of .csv file. I assume it has been converted to the default
settings of the excel sheet.
2. after corrections are made, I want to save the file back to .csv file

I have never written a macro. So can one of you help.

Shanti


--

Dave Peterson
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
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
Increase Your Business By Data Conversion, Data Format and Data EntryServices in India Data Entry India Excel Worksheet Functions 1 March 31st 08 12:51 PM
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing [email protected] Excel Discussion (Misc queries) 0 March 20th 08 12:45 PM
Data in Cross-Tab format: needs to be written in Table Format runyan Excel Programming 2 October 4th 05 07:58 AM
code for converting data format in another format mistral Excel Programming 0 August 19th 04 04:50 PM


All times are GMT +1. The time now is 07:19 PM.

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

About Us

"It's about Microsoft Excel"