Jump to content
Sign in to follow this  
mcornbill

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

Recommended Posts

mcornbill

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

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
Share on other sites
mcornbill

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

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
Share on other sites
mcornbill

:)

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

Share this post


Link to post
Share on other sites
PsaltyDS

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

Share this post


Link to post
Share on other sites
mcornbill

Lol you won't believe me will you! That function will not appear in my help file for some reason, look here's the proof:

Posted Image

I'm clearly missing something from my installation?

Share this post


Link to post
Share on other sites
youknowwho4eva

I just type exc and I see like 20 excell functions... Can you go to content, expand the autoit folder, and click on Introduction? does that say 3.3.0.0 at the top?


Giggity

Share this post


Link to post
Share on other sites
mcornbill

Ok it was v3.2.6.0, sorry everybody I thought I was up to date :)

Thank you all!

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  

×