Solved

Code Modification

Posted on 2016-08-27
6
42 Views
Last Modified: 2016-08-28
I had this question after viewing RT - Data.

Hi Experts,

i need little modification in existing code.please help me out.
in attached WB Sheet main - Button Start Process - it will download zip files from server - unzip - post entries to respected file.it download data for duration between date - Cell G3 & Cell H3. after process completed in cell G3 date is change to last downloaded file date plus 1.

Need  modification
A) Change in download path i.e. fix download path in code it self instead of selecting in main sheet....path is D:\RTTrading\Data\
B) current process download data and past last date+1 in cell G3...so on next day if i click Start process button - it will delete all file and download new files and post to respective sheet .....but problem arise there ....i see only one entry in respected sheets ...i required macro dont delete old entries in respective sheet and post only new entries and limit entries to 30 row data (header is so in real term last data line is row 31).

See attached

Thanks
Sample.xlsm
0
Comment
Question by:itjockey
  • 3
  • 2
6 Comments
 
LVL 27

Expert Comment

by:MacroShadow
ID: 41773490
A) Change in download path i.e. fix download path in code it self instead of selecting in main sheet....path is D:\RTTrading\Data\

Open in new window

In sheet Main replace this:
gstDestinationFolder = GetNewFolder(gstDestinationFolder, "Destination Folder")

Open in new window

with this:
gstDestinationFolder = GetNewFolder("D:\RTTrading\Data\", "Destination Folder")

Open in new window


.....but problem arise there ....i see only one entry in respected sheets ...i required macro dont delete old entries in respective sheet and post only new entries and limit entries to 30 row data (header is so in real term last data line is row 31).
I don't understand.
0
 
LVL 8

Author Comment

by:itjockey
ID: 41773689
0
 
LVL 21

Accepted Solution

by:
Ejgil Hedegaard earned 500 total points
ID: 41773892
The original workbook had the start date = today - 45.
That creates the required zip and csv files for all 30 entries.
Then the csv update use the most recent 30 files, also if you miss a daily update.

If the macro does not change the start date, it works.
See sample file where start date change in macro removed.
Fixed folder D:\RTTrading\Data\
Screen updating turned off.
Added a Status form to show the progress.

This was much easier to change than write a new process for the csv update, and I think it is better to do a complete update.
It only runs about a minute.
Sample.xlsm
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 8

Author Comment

by:itjockey
ID: 41773908
ok no worries ...i thought if we required daily one file to update all sheets or say if i dint done process for 2 days then ...previous method will start download from that date  were we left ,,,so only 2 files download and update sheets accordingly.

just waiting  for  your view point ....after that i will close this question.

Thanks
0
 
LVL 21

Expert Comment

by:Ejgil Hedegaard
ID: 41773973
It is more complicated to check and adjust sheets to a random number of updates, than just update all.
That, and because the update time is not very long, is why I kept the original solution to update all.
0
 
LVL 8

Author Closing Comment

by:itjockey
ID: 41774279
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Being an active EE Expert means to get a lot of (E)EMail, as you certainly know. If you are using Outlook, I'll show you how to minimize your inbox contents without losing anything – even improve the experience by changing the Subject line to facili…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now