Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

How Can I Test a Dynamic Array to See if the Array is Empty?

(image) Hey, Scripting Guy! How can I test a dynamic array to see if the array is empty?-- SH(image) (image) (image) Hey, SH. Today’s column is dated Wednesday, July 5th. If there really is a column today that means that, unlike last year, the neighbors and their errant fireworks didn’t set fire to the Scripting House. If there isn’t...

How Can I Import a Fixed-Width File into Microsoft Excel?

(image) Hey, Scripting Guy! How can I import a fixed-width file into Microsoft Excel?-- JP(image) (image) (image) Hey, JP. We have a confession to make here, something we’re terribly ashamed of: for a moment - just for a moment, mind you - we doubted Microsoft Excel. Yes, we know: how could we do such a thing? All we can say is that we ...

How Can I Build an Array from a Column of Data in Excel?

(image) Hey, Scripting Guy! How can I build an array from a column of data in Excel?-- AH(image) (image) (image) Hey, AH. Obviously none of the Scripting Guys has any need to go on a diet (perish the thought!), but we do know that one time-honored dieting strategy is the theory of tiny bites: instead of gulping down your food in a few huge...

How Can I Determine the Number of Items Generated by the Split Function?

(image) Hey, Scripting Guy! I know I can use the Split function to split a line into individual items. But how can I tell how many “splits” I ended up with; that is, how many individual items did I generate from a single line?-- SA(image) (image) (image) Hey, SA. For those of you who are relative newcomers to scripting (or those of you...

Can I Read a Text File From the Bottom Up?

(image) Hey, Scripting Guy! I have a log file in which new data is appended to the bottom of the file; that means the most recent entries are at the end of the file. I’d like to be able to read the file starting with the last line and then ending with the first line, but I can’t figure out how to do that.-- MB, Milwaukee, WI (...