PDA

View Full Version : Import Text File to tab in sheet



SteveG
09-20-2007, 08:49 AM
Hi all,

I have a .txt file that is scheduled to run daily (business days only). The file is saved using the report run date as the name. What I would like is to have excel import this file ("," delimited) automatically without human intervention each morning at the same time. The file would be imported to a specific tab (Current_Month_Data) in the workbook and overwrite the previous days import, calculate the workbook and save the changes turning the auto calc off. The workbook is huge with a lot of calculations that by month's end takes 30 minutes + to calculate and I am attempting to automate the manual processes so when I get in in the morning the report is complete. I would also like to have the code run at a specific time each morning. Is this possible?


Thanks in advance for your assistance.

SteveG

Zack Barresse
09-20-2007, 02:17 PM
Hello SteveG,

Do you already have code to do this or do you need some? Also, how do you automatically run your text file? Are you using windows scheduler? I think another thing you should look at is why it takes so long to calculate, as opposed to looking at ways to automate the extra long calculation process.

SteveG
09-25-2007, 01:13 PM
Thanks for the reply firefytr. I do not currently have any code to do this. I am using windows scheduler to run the .txt file. As to why the calculation is taking so long, I believe it is due to the large size of the source data and the large number of conditional calculations being done within the workbook using in cell formulas. I am a total rookie and not certain where to start to perform the calculations in VB if that would make the calc faster.

At the beginning of the month (days 1-7 say) it usually only takes a few minutes but as the source data increases it slows down considerably. I scrub the data as much as I can to reduce the size first but it is still very slow. Eventually this will be put into a SQL database (those wheels turn pretty slowly) but in the meantime I'd like to try and streamline the process as much as possible.


Thanks again!
Steve