New To Progress - need help

trolls35

New Member
Hi..I am a brand new to Progress and am needing some help involving accessing excel cells and exporting specified cells into a txt file. Any help at all would be monumentally appreciated!! Here is what I have so far.

/*use pro-tools...then use Com Object viewer to find correct syntax
for use with excel.application */

DEFINE VARIABLE ch-excel AS COM-HANDLE NO-UNDO.
DEF VAR chbook AS COM-HANDLE NO-UNDO.
DEF VAR chsheet AS COM-HANDLE NO-UNDO.
DEF VAR chcell AS COM-HANDLE NO-UNDO.

/*start excel application + open a .xls worksheet */
CREATE "excel.application" ch-excel.
ch-excel:VISIBLE = TRUE.
chbook = ch-excel:workbooks:OPEN("c:\temp\accdata1.xls").

PAUSE.
ch-excel:ActiveWindow:Close.
RELEASE OBJECT ch-excel.



Thanks, Trolls35
domers35@hotmail.com
 

MSilva

New Member
Hi,

See a sample at directory src\samples\activex\excelgraphs
named oleauto.p , this procedure has some basics....

Good luck

Mauricio Silva
 

trolls35

New Member
Thanks, but that's not exactly what I am needing. I need to export cells from excel into a .txt file so that our program can read the file. The example shows how to get info from progress into excell, but not how to get it from excel into a .txt file.

Thanks, Jason Ready (Trolls35)
Creditview AS

domers35@hotmail.com
 

MSilva

New Member
trolls35,

If you write to excell you can read from it...

For example:

.
.
.
.
.

output to "c:\temp\txtfile1.txt" .

put
chWorkSheet:Range("A1"):Value skip
chWorkSheet:Range("B1"):Value skip
chWorkSheet:Range("C1"):Value skip.

output close.


Voila! You have a txt file containing cells a1,b1 e c1...

OK??
 

trolls35

New Member
Thanks alot Mike!! I just started with Progress yesterday and I also am still learning about programming so you are a great help!! Looks like that is exactly what I was looking for.

Thanks, Jason Ready
domers35@hotmail.com
 
Top