Jump to content
Sign in to follow this  
kctvt

Problem with AutoIT and Excel

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

Share this post


Link to post
Share on other sites

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

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 2021-04-14 - Version 1.5.3.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2021-04-13 - Version 1.6.4.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Task Scheduler (2019-12-03 - Version 1.5.1.0) - Download - General Help & Support - Wiki

Tutorials:
ADO - Wiki, WebDriver - 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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...