Jump to content

Read from excel and put into list view


Recommended Posts

Hi all,

I want to open an excel file i only know how many colloms i have, i need to find out how my program can see how many rows it has and then put each row in an new line of the listview and also the colloms in the right listview item, don't have to sort becasue it's from left to right.

Hope someone has an example file beacuse i don't know how to make those things...

i already read this link: http://www.autoitscript.com/forum/index.php?showtopic=34302

it's the excel udf

I little problem, hard to find and fix

Link to comment
Share on other sites

Hi all,

I want to open an excel file i only know how many colloms i have, i need to find out how my program can see how many rows it has and then put each row in an new line of the listview and also the colloms in the right listview item, don't have to sort becasue it's from left to right.

Hope someone has an example file beacuse i don't know how to make those things...

i already read this link: http://www.autoitscript.com/forum/index.php?showtopic=34302

it's the excel udf

From Locodarwin's ExcelCOM_UDF.au3: _ExcelSheetUsedRangeGet()

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Hi,

ok, will take a look at it.

Can i put all of the information into the listview? how to do that?

You can read an entire sheet to a 2D array with _ExcelSheetReadToArray(), and then do whatever you want with the data, including posting it to a ListView. See the help file for the native ControlListView() and the UDF _GuiCtrlListView_* functions in the help file.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

i don't get it working now. i need 2 array's:

$array = _ExcelSheetUsedRangeGet($oExcel, $vSheet)

The first one if the file, but what's teh second one? name sheet?

I little problem, hard to find and fix

Link to comment
Share on other sites

i don't get it working now. i need 2 array's:

$array = _ExcelSheetUsedRangeGet($oExcel, $vSheet)

The first one if the file, but what's teh second one? name sheet?

The first parameter is an object reference to the Excel WorkBook (not exactly the same thing as "file"), returned from _ExcelBookOpen().

The second parameter is either the name (if it's a string) or number (if it's and integer) of the sheet you want.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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