Solved

Code Modification

Posted on 2016-08-27
6
46 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:Naresh Patel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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:Naresh Patel
ID: 41773689
0
 
LVL 22

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
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

 
LVL 8

Author Comment

by:Naresh Patel
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 22

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:Naresh Patel
ID: 41774279
Thanks
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

The code described here does no longer work. Please see replacement Article: http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/A_3887-Getting-your-EE-Ranking-statistics-in-Excel-The-Next-Generation.html (http…
This is an Add-On procedure to be used in conjunction with the code provided in Reducing EE Email Clutter using Outlook (http://www.experts-exchange.com/Software/Office_Productivity/Groupware/Outlook/A_3146-Outlook-Processing-EE-emails-on-Receive.…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

707 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