![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: May 2002
Posts: 91
|
Hi All,
Can anyone solve this problem. I have an automated program that generates 5 text files every day from oracle. Now i want an automation for those 5 five files to be picked up and transferred into excel spread sheets without my interaction. In that i have some columns to be made some formatting. And while saving the files it should append the date stamp to the filename. Is this possible ? If so can any one help me? If so i will be glad to give more info. Any help would be appreciated. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Apr 2002
Location: Vancouver BC , Canada
Posts: 6,259
|
Why not get an OBDC connection between excel and your DB and import it directly instead of sending it to text first ?
In other words use the excel sheet as your front end. |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: May 2002
Posts: 91
|
Can you tell me how to do that way, as it should run daily without my intervention.
the filenames should be datestamped everyday. And how to get an odbc connection, can you help me. thanks in advance. |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: May 2002
Posts: 91
|
No body knows how?
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: May 2002
Posts: 91
|
I hope no GURUs out there. Not even whether it is possible or not answer coming to me.
|
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
You have made four posts in a little over 1 hour!!! And you have nearly dismissed the one answer already provided.
Please show some patience. You might also be able to achieve your ends by running a macro at a set time and do something like the following (untested): '------------- Sub test() Dim strFileName Workbooks.OpenText FileName:="Extended Name of your file", Origin _ :=xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier:= _ xlDoubleQuote, Tab:=True, FieldInfo:=Array(1, 2) strFileName = Left(ActiveWorkbook.Name, _ Len(ActiveWorkbook.Name) - 4) & Format(Date, "mmddyyyy") ' do your stuff With ActiveWorkbook .SaveAs FileName:=strFileName, FileFormat:=xlNormal .Close End With End Sub '--------------------- You will do something like this for all your files. HTH, Jay [ This Message was edited by: Jay Petrulis on 2002-05-09 16:13 ] |
|
|
|
|
|
#7 |
|
Board Regular
Join Date: May 2002
Posts: 91
|
Thanks Jay.
But i dont know where to put this code and how to run it. can you please tell me step by step. thanks in advance |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|