|
-
Jul 16th, 2004, 06:08 AM
#1
Thread Starter
New Member
Excel operations
Hello Friends..
I am using VB 6.0 to transfer data from *.csv ( comma deliminated excel files ) files from each row there to individual *.xls ( pure Excel files ) files for individual rows in *.csv files.
This works fine and i get output properly as i want. But there is one problem regarding data in one coloumn.
I have a coloumn named Date to be inserted in the resultant Excel file. I am presently sending data as pure String format data as for e.g. "07-16-04".
I get it written there in resultant file but in the format as 7/16/2004.
I want it to be written as 07/16/04 or 07-16-04 as such.
its something regarding the format of the cell..
Could anyone please help me out with this..
Nayan
-
Jul 16th, 2004, 11:13 AM
#2
The format of the date can be controlled by Windows itself. Try changing in in your Control Panel.
-
Jul 16th, 2004, 12:32 PM
#3
don't do that.... Open one if the worksheets, start recording a macro (doesn't matter what you call it). Once it is going, click the col header, Right-click, and format the dates how you want it.
Stop the macro recording, then through the Macro menu (under Tools) Edit the macro and look at the code. You should be able to copy it, and put it into your VB app almost exactly as it it. May want to change the col that is selects to be a little more dynamic. Oh, and the object name references will need to be tewaked, but it should be obvious what needs to be what.
TG
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|