I have used import cell colors in the excel import because I have clients who color cells that should be included or excluded. The colors import fine but I havent found an easy way to access the cell's color state in order to exclude those cells. The only workaround I've found is to get the columns script and parse out the row numbers. I'm afraid that this might not be very reliable. Are there any functiosn to read the cell's color directly? Note that the import cell colors does not change the row states or set any color properties for the column.
dt = Open(
"Data.xlsx",
Worksheets( "Sheet1" ),
Use for all sheets( 0 ),
Worksheet Settings(
1,
Has Column Headers( 1 ),
Number of Rows in Headers( 1 ),
Headers Start on Row( 2 ),
Data Starts on Row( 3 ),
Data Starts on Column( 1 ),
Data Ends on Column( 1 ),
Import Cell Colors( 1 )
)
);
Rlist = {};
t = arg(arg((:SubjectID << get script),4),1);
for(i=1,i<=narg(t),i++,insert into(Rlist, arg(arg(t,i),2))); //the first arg is the colour the second the list of rows
dt1 = dt << subset(rows(Rlist));