XLGetSheetDims clarification

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
SandyDoss
Junior Coder
Posts: 40
Joined: Wed Sep 07, 2016 12:47 am

XLGetSheetDims clarification

Post by SandyDoss » Thu Sep 08, 2016 6:08 pm

DISCLAIMER: I AM A TOTAL MACRO SCHEDULER NOOB!

So, let me start by saying that I'm finding your scripting application easier and easier to use as I go along. I've graduated from a simple 'open notepad.exe and write a line' to accessing numerous excel spreadsheets in a directory and using data from specific cells as input to another application on a remote computer. All in just a matter of days. So thanks for taking pity on us older (elderly) coders. :D

I need clarification on the XLGetSheetDims command - the manual says that it returns the number of rows and columns containing data in a given sheet. However, I have found that the term 'data' may not mean text, numbers or spaces, but may also mean any formatting styles (cell borders, etc). Is this correct?

Thanks,
Sandy

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

Re: XLGetSheetDims clarification

Post by Marcus Tettmar » Fri Sep 09, 2016 11:08 am

Yes, if the cells have been formatted, then it will count down to the last one formatted. What I usually do when looping through a sheet is always test to see if the cell is empty and break out of the loop if so.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

SandyDoss
Junior Coder
Posts: 40
Joined: Wed Sep 07, 2016 12:47 am

Re: XLGetSheetDims clarification

Post by SandyDoss » Mon Sep 12, 2016 11:25 pm

Thanks, Marcus

Appreciate the quick reply

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