Sign in to follow this  
Followers 0
kctvt

Problem with AutoIT and Excel

4 posts in this topic

Problem with AutoIT and Excel :unsure:

Hi there, I creating a soft help me do something in Excel. I want to creat a soft help me manage salary. In below Piture, you will see what I want to do.

Posted Image

I have 3 Table.

- General Data.

- Data Employees.

- Data Commission.

I want to know the Commission when I use Autoit with Excel.

This is my code :

#include <IE.au3>
#include <File.au3>
#include <Array.au3>
#include <Date.au3>
#Include <Excel.au3>
#include <Word.au3>
#include <FTPEx.au3>


$partDataEmployees = "E:\DataEmployees.xls"
$partDataGeneral = "E:\DataGeneral.xls"
$partDataCommission = "E:\DataCommission.xls"

$oExcelDataEmployees = _ExcelBookOpen($partDataEmployees)
$oExcelDataGeneral = _ExcelBookOpen($partDataGeneral)
$oExcelDataCommission = _ExcelBookOpen($partDataCommission)




$b = 3


Do

IF _ExcelReadCell($oExcelDataGeneral,$b,9) = "" then

_ExcelReadCell($oExcelDataGeneral,$b,5)
_ExcelReadCell($oExcelDataGeneral,$b,6)
_ExcelReadCell($oExcelDataGeneral,$b,7)
_ExcelReadCell($oExcelDataGeneral,$b,8)


$a = 17
Do

$Name = _ExcelReadCell($oExcelDataEmployees,$a,2)
$Phone = _ExcelReadCell($oExcelDataEmployees,$a,3)
$Email = _ExcelReadCell($oExcelDataEmployees,$a,4)


If $Name = _ExcelReadCell($oExcelDataGeneral,$a,8) and _ExcelReadCell($oExcelGeneral,$a,10) = "" then



[color="#FF0000"][b]Start count total service of that saler, and count commission. Such as : 

- Tom have 2 Hosting not paid yet, 1 host paid --> Commission is 20$/hosting.

- Luci have 5 hosting not paid yet, 2 hosting paid ---> Commission is 40$/hosting.

===> I dont know how to do this. Count hosting.

[/b][/color]

This is my problem. Hope everybody'll help me. Thanks :>

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Problem with AutoIT and Excel :unsure:

This is my problem. Hope everybody'll help me. Thanks :>

Did you try to use _ExcelReadSheetToArray ? Edited by JoHanatCent

Share this post


Link to post
Share on other sites

_ExcelReadSheetToArray ???

Umm... can you give me an example more clearly ?

Share this post


Link to post
Share on other sites

The AutoIt help file has examples for every function.

In SciTE press F1 and go to User Defined Functions -> Excel


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0