rathinagiri, thanks for good words... but about my "fantastic programming concept and logic"...
If you don't know something, and I know it (because I read other Internet pages and other forums and asked some days ago - like everyone of us - many "foolish questions" to other people who knows it... and now I
think [but not sure] that I know about it a liiiiittle greater than you) - why I can't answer to you when you're asking: "hey! anybody knows how I can..."?
I'm
really newby in many programming things - and in Harbour+MiniGUI and DBF->Excel tasks too... But I like (as everyone "really means himself a programmer" must to like - I think) to learn new and new and new... every day.
Marek, about your 1st problem ("formatting data"):
For example, I want to "bold" data in 3rd column ("C" - Date_of_Birth). I know (after ALL data pasted - i.e. after ENNDO), what is "start row" (in my examle =1, but now let's named it "nRow1") and "end row" (in example - nRow
-1, but now let's named it "nRow2")... I'll do something like this (
after ENDDO):
Code: Select all
// select all cells (what I need to "bold")
oSel := oSheet:Range("C"+ltrim(str(nRow1))+":C"+ltrim(str(nRow2)))
// bold selected RANGE -
// don't work with EVERY cell for that (if you have loooong list)
// it's save your time for coffee :)
oSel:Font:Bold := .T.
// you can add next line too
// (for to be sure that "bold" data placed correctly in sheet view)
oSel:Cols():AutoFit()
...and that's all folks ("one move" - remember?)!
It's main concept in working with OLE-objects: "do as much as you can with
ranges - not with each word, cell etc..." (such work is veeeery "lazy")
About your 2nd problem - I'll think how to do it
everywhere...
Guys, I found one mistake in my example in previous post... Sorry
I forgot to write EXIT from DO...ENDDO (and we have "neverending story"
). Correctly it must be like this:
Code: Select all
...
i := 0
// now we ready to next step :)
// is work ended? if "yes" - EXIT
if eof()
exit
endif
//
endif
enddo
...and someone told about my "fantastic logic"?..
Primary-school mistake!