Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Excel file to formatted worksheet

Status
Not open for further replies.

Thyezer

MIS
Apr 17, 2002
129
US
I am trying to import a .csv file into a formatted worksheet that I created using PROGRESS. My problem is I am getting a second sheet that has the unformatted info and no info in the main sheet....example code:
FILE-DEST is the destination file that holds the .csv file.

CREATE 'Excel.Application' chExcel NO-ERROR.
chWorkBook = chExcel:WorkBooks:ADD(FILE-DEST).
chWorkSheet = chExcel:Sheets:Add(,chWorksheet,1,).


/* Page Setup */
chWorkSheet:pageSetup:printTitleRows = 'A1:i5'.
chExcel:Sheets('sheet1'):NAME = 'PRESS ROOM WC Dispatch'. /******Sheet Title**********/
chExcel:Range('A6'):SELECT.
chExcel:ActiveWindow:FreezePanes = TRUE.

ASSIGN shop = "PRESS ROOM WC Dispatch".

chExcel:Sheets(shop):Select.

chWorkSheet = chExcel:Sheets(shop). /* Sets the active WorkSheet */

Can anyone explain what I am missing?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top