Jump to content
Sign in to follow this  
PINTO1927

VIEW RANGE CELL EXCEL INTO GUI

Recommended Posts

@PINTO1927 welcome to the forum. Please be aware that this forum is dedicated to helping people with their scripts; it is not a place where you put in a request and someone barfs up code for you. What have you tried on your own? To get you started, here is an example for a small GUI:

#include <GUIConstantsEx.au3>

GUICreate("Test", 300, 300)

GUISetState(@SW_SHOW)

    While 1
        Switch GUIGetMsg()
            Case $GUI_EVENT_CLOSE
                ExitLoop
        EndSwitch
    WEnd

GUIDelete()

Use this as a starting point, then do some reading in the help file:

  • Look at GUICtrlCreateEdit or GUICtrlCreateListView in the help file to get the right input mechanism
  • Look at the Excel functions in the help file to pull the data that you want to populate your GUI.

As for your need of without that excel file is open, you need to elaborate on this. Do you mean Excel is not installed on the client machine, or you just don't want the user to see the Excel spreadsheet while it is open?


"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites

Thank you, Office is installed on the machine but I would need a GUI can bring me back the values on an Excel spreadsheet without being open excel.

Share this post


Link to post
Share on other sites

Use the Excel UDF to read the range into an array and then fill a ListView to be displayed in a GUI.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.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

 

You can rate an Example ? I'm working on this script, but excel opens for a short time. I wish it would not open excel.

 

 

 

#include <Array.au3>
#include <Excel.au3>
#include <MsgBoxConstants.au3>

$excel = _Excel_Open()

$foglio = "***PATH***"
Local $lavoro = _Excel_BookOpen($excel, $foglio, False, False)

$risultato = _Excel_RangeRead($lavoro, Default, $lavoro.ActiveSheet.Usedrange.Columns("A:I"), 1)

local $finale[UBound($risultato)][9]

for $1 = 0 to UBound($risultato) - 1
   $finale[$1][0] = $risultato[$1][0]
   $finale[$1][1] = $risultato[$1][1]
   $finale[$1][2] = $risultato[$1][2]
   $finale[$1][3] = $risultato[$1][3]
   $finale[$1][4] = $risultato[$1][4]
   $finale[$1][5] = $risultato[$1][5]
   $finale[$1][6] = $risultato[$1][6]
   $finale[$1][7] = $risultato[$1][7]
   $finale[$1][8] = $risultato[$1][8]
next
$lavoro.Application.Quit
_arraydisplay($finale,'*** TITLE TEST***,default, 32,default,)

 

Share this post


Link to post
Share on other sites

Use

$excel = _Excel_Open(False)

to open Excel in the background (according to the help file ;))


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2020-09-05 - Version 1.5.1.1) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2020-06-27 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (NEW 2020-06-27 - Version 1.3.2.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...