How do I count Columns on a Sheet

Questions and answers on how to use XLSReadWriteII 3/4/5.
Post Reply
indigomage
Posts: 3
Joined: Tue May 17, 2005 9:54 am
Location: Farnborough, UK
Contact:

How do I count Columns on a Sheet

Post by indigomage »

How do I count the number of columns on a Sheet?

I can get the count of the number of sheets, but how do I get this for Columns
I tried LastCol, but that always returns 0.


regards

Ian
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: How do I count Columns on a Sheet

Post by larsa »

Hello

Use XLS[Sheet].CalcDimensions before you use LastCol (or FirstRow,FirstCol,FirstRow).

CalcDimensions is not called automatically because it takes some time to calculate it.
Lars Arvidsson, Axolot Data
indigomage
Posts: 3
Joined: Tue May 17, 2005 9:54 am
Location: Farnborough, UK
Contact:

Re: How do I count Columns on a Sheet

Post by indigomage »

Thanks, will give that a go!
Post Reply