PINTO1927

VIEW RANGE CELL EXCEL INTO GUI

7 posts in this topic

 

Hi guys,

I need to display a range cells of excel in a gui, without that excel file is open:sweating:

Thank's

 

Share this post


Link to post
Share on other sites



@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?


√-1 2^3 ∑ π, and it was delicious!

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

 

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 ;))

1 person likes this

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

Thank's, I had A very small mistake .. :sweating:

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