Jump to content

Read a cell's data from an excel spreadsheet.....


Recommended Posts

Hi Guys

Ok this one may not even be possible but I'll see if any of you know a way around it.

I basically want to read data into a variable from an Excel spreadsheet, the data is just going to be a title, i.e. Mr, Mrs, Miss, Ms etc. I then want to use the 'Send' command to send the keystrokes of that particular title.

I'm transferring data from a spreadsheet into another program and the majority of the fields in this program are free text fields so I'm simply using the Send command for copying and pasting. However the title field is a dropdown list and you can't paste into it. You can start typing the title and it will then go to the correct entry which is what I'm trying to achieve. Am I making sense?

Cheers

Mark

Link to comment
Share on other sites

Hi Guys

Ok this one may not even be possible but I'll see if any of you know a way around it.

I basically want to read data into a variable from an Excel spreadsheet, the data is just going to be a title, i.e. Mr, Mrs, Miss, Ms etc. I then want to use the 'Send' command to send the keystrokes of that particular title.

I'm transferring data from a spreadsheet into another program and the majority of the fields in this program are free text fields so I'm simply using the Send command for copying and pasting. However the title field is a dropdown list and you can't paste into it. You can start typing the title and it will then go to the correct entry which is what I'm trying to achieve. Am I making sense?

Cheers

Mark

Look these up in the help file: _ExcelReadCell() and ControlSend()

:)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Look these up in the help file: _ExcelReadCell() and ControlSend()

:)

I figured that the ControlSend command would be used however I can't find reference to the _ExcelReadCell command anywhere in the help file? I'm using the latest version.

Cheers

Edited by mcornbill
Link to comment
Share on other sites

I'm using AutoIt version 1.71 could that be why?

:)

Uhm... yeah!

:D

Did you really mean AutoIt 1.71, or is that just your version of SciTE for AutoIt? The current production version of AutoIt is 3.3.0.0 and it has been many years since you could download a version that old.

Download the current version here: AutoIt v3 - Downloads

:o

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

:)

Uhm... yeah!

:D

Did you really mean AutoIt 1.71, or is that just your version of SciTE for AutoIt? The current production version of AutoIt is 3.3.0.0 and it has been many years since you could download a version that old.

Download the current version here: AutoIt v3 - Downloads

:o

No I realised after I'd posted that 1.71 was the version of SciTE like you've just mentioned. I am already running the latest version of AutoIt. I've searched within the index and search tabs within the help. I've just searched for the word "excel" and 8 topics are returned, none of which are what I'm looking for.

I'm not being stupid honest! :D

When compiling it says that _ExcelReadCell is an unknown function name. Is there not a package/addon that I need to install for Excel functions?

Edited by mcornbill
Link to comment
Share on other sites

No I realised after I'd posted that 1.71 was the version of SciTE like you've just mentioned. I am already running the latest version of AutoIt. I've searched within the index and search tabs within the help. I've just searched for the word "excel" and 8 topics are returned, none of which are what I'm looking for.

I'm not being stupid honest! :o

When compiling it says that _ExcelReadCell is an unknown function name. Is there not a package/addon that I need to install for Excel functions?

Go to the index tab of the help file and start typing _ExcelReadCell, and it will jump to that function. To use any of the UDF functions, you have to #include the file that contains that function. Look at the example script in the help file under _ExcelReadCell() and you will see this line near the top of the script:
#include <Excel.au3>

:)

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...