Using the Databar feature with real data

I received an email with some sales figures in a table. I just pasted it into a new VFP program, added about 6 lines of code (below), then pasted the code from Excel's new gradient Data Bar feature is cool: you can do it too! After a couple minor adjustments, I had a graphical display of the data indicating some trends that were easy to spot.

I used the APPEND FROM command with the DELIMITED clause to create a table instantly. The CHRTRAN function removed the comma separator for the thousands.

TEXT TO cdata noshow

      <<paste here>>

ENDTEXT

STRTOFILE(cdata,"t.txt")

CREATE cursor test (cmonth c(15),sales c(10),units c(20))

APPEND FROM t.txt DELIMITED WITH tab

cFld="Units"

SELECT cmonth,INT(VAL(CHRTRAN(&cfld,",",""))) as &cfld FROM test INTO CURSOR result