Looking to build a solution...

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Tourless
Pro Scripter
Posts: 69
Joined: Wed Jun 14, 2017 1:53 am
Location: NY

Looking to build a solution...

Post by Tourless » Tue Nov 14, 2017 9:34 pm

Hi Folks,

I'm looking to build a solution whereby I check a folder via a unc path and take the newest file and import it into excel. The file in questions will be a .csv file BUT the delimiter is a semicolon (I have no control over that). Not sure if that complicates things. I've been playing around with Excel 2016 and where I can import the file, it fires off some sort of queries and connections wizard which excel does a poor job of capturing into a recorded macro that is then reusable. Part of the recorded macro that generates speaks to the delimiter, number of columns, and encoding of the source file, which may be useful if I'm going to try and attempt this using ms.
I already know how to pick a folder and find the newest file using ms, it's the import into excel that leaves me scratching my head. Any pointers in the right direction would be greatly appreciated.

thanks as always!

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Looking to build a solution...

Post by Marcus Tettmar » Tue Nov 14, 2017 10:21 pm

You can continue to use the macro in Excel and call it from Macro Scheduler, or rewrite the macro's VBA code to VBScript to run within your Macro Scheduler macro. See:
http://help.mjtnet.com/article/19-conve ... o-vbscript
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Tourless
Pro Scripter
Posts: 69
Joined: Wed Jun 14, 2017 1:53 am
Location: NY

Re: Looking to build a solution...

Post by Tourless » Fri Nov 17, 2017 9:14 pm

Thanks for the idea Marcus. But I'm not sure that's the right way to go... So I'm trying to work with TeamViewer to remote into a PC and perform a few clicks or tabs to accomplish running and saving a report. To that end I'm working with a free version of TeamViewer and at the end of a session (not every session mind you) there is an annoying little pop-up titled Sponsored session.

I know I could simply look for the presence of this popup on my local machine (where my script is running) but when I connect to the remote machine through TeamViewer, is there a way I can search for the existence of that pop-up, and if it exists, give it focus and click it's OK button? I'm thinking this is a good case for image recognition but I'm not sure how that's going to work on a remote session. I guess trial and error will be my guides. But if anyone has any other ideas how I can account for and eliminate the pop-up, I'm all ears!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts