Jump to content

Problem with AutoIT and Excel


 Share

Recommended Posts

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 :>

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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...