Jump to content

Recommended Posts

Posted

Hello all,

I am writing code in which I want to enter" size of Array "from excel sheet !  there are few of Conditions ..

1. I  want my code to get the "last row no" which has some data and Stop acting when it will get any non-empty cell of any column .

I have attached One excel file According  to this  file it must have to give value "9" , I did many attempt to make this possible but couldn't so please help me by giving any right solution .

Thanks

 

example.xlsx

Posted (edited)

Something like this:

#include <Excel.au3>
Global $oExcel = _Excel_Open()
Global $oWorkbook = _Excel_BookOpen($oExcel, @ScriptDir & "\Example.xlsx")
MsgBox(0, "", "Last used row is # " & $oWorkbook.ActiveSheet.UsedRange.SpecialCells($xlCellTypeLastCell).Row)

Details can be found in the wiki.
https://www.autoitscript.com/wiki/Excel_Range

 

 

Edited by water

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

:)

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

I do not know of a book about AutoIt but i think the best way to learn is

 

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

 

 

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...