Jump to content
Sign in to follow this  
Rishav

getting excel color index of a range onto an array

Recommended Posts

Rishav

Hido folks

I know how to get the excel color index on a cell by cell basis. I was currently trying to get the color index off a whole excel range and put it in an array

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

$File1 = FileOpenDialog("Select Excel", "", "xls (*.xls)")
$oExcel1 = _ExcelBookOpen($File1, 0)
$ExcelArray1 = _ExcelReadSheetToArray($oExcel1)

; Create new array with proper size. Dimensions are same as the array created from the excel
Dim $ArrayColor1[$ExcelArray1[0][0] + 1][$ExcelArray1[0][1] + 1]

$ArrayColor1 = $oExcel1.Activesheet.Range("A1:T20").Interior.ColorIndex
_ArrayDisplay($ArrayColor1)

_ExcelBookClose($oExcel1, 0)

But my code is not working. Any help?

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.