Opening Excel file through MFG/PRO

Hello,

I am trying to Open Excel file from MFG/PRO.
I wrote a program .p in character client which opens specified excel file correctly.
I attched this program to MFG/PRO menu.
But it is neither opening the file nor giving any error...

Can anyone please help me for this....

Waiting for reply...
Thks in advance.....
 
What interface of MFG/PRO are you using and send me the sample code and error message. What you are trying to do is straight forward.
 
Can u plz tell me wht do u mean by MFG/PRO interface????

N the code is

&SCOPED-DEFINE my-table tt_temp


DEFINE TEMP-TABLE tt_temp
FIELDS tt_nbr LIKE pt_mstr.pt_part COLUMN-LABEL "Part"
FIELDS tt_um LIKE pt_mstr.pt_um COLUMN-LABEL "Part UM".


DEF VAR lv-output-path AS CHAR INIT "c:\mfgdemo\" NO-UNDO.

DEF VAR lv-output-type AS CHAR INIT "csv" NO-UNDO.

DEF VAR lv-headings AS CHAR NO-UNDO.
DEF VAR lv-count AS INT NO-UNDO.

DEF STREAM data-export.


DELETE tt_temp NO-ERROR.


FOR EACH pt_mstr NO-LOCK:
CREATE tt_temp.
ASSIGN tt_nbr = pt_part
tt_um = pt_um.
END.



/* Make a list of field-headings */
FOR EACH _file
WHERE _file-name = "{&my-table}" NO-LOCK.
FOR EACH _field OF _file NO-LOCK BY _field._Order.
lv-count = 1.
IF _field._extent = 0 THEN
lv-headings = lv-headings + "," + _field._field-name.
ELSE lv-headings = lv-headings + "," + _field._field-name + "[1]".
REPEAT WHILE lv-count < _field._extent:
lv-count = lv-count + 1.
lv-headings = lv-headings + "," + _field._field-name + "[" + STRING(lv-count) + "]".
MESSAGE lv-headings
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.
END.
END.

/* Output the field-headings */
OUTPUT STREAM data-export TO VALUE(lv-output-path + "{&my-table}" + "." + lv-output-type).
PUT STREAM data-export UNFORMATTED LEFT-TRIM(lv-headings, ",") SKIP.
PUT STREAM data-export UNFORMATTED LEFT-TRIM("Part No,Part UM", ",") SKIP.
/* Output the table contents */
FOR EACH {&my-table} NO-LOCK.
EXPORT STREAM data-export DELIMITER "," {&my-table}.
END.


DEFINE VARIABLE excelAppl AS COM-HANDLE.

CREATE "Excel.Application" excelAppl.

excelAppl:Visible=true.
excelAppl:Workbooks:OPEN('c:\mfgdemo\tt_temp.csv').

RELEASE OBJECT excelAppl.


OUTPUT STREAM data-export CLOSE.

 
Interface character or GUI?

It worked fine for me..see attached. What is the error message you are getting ?
 

Attachments

  • temp.txt
    13.3 KB · Views: 28
Thks for u r reply kishor..

I have checked on both GUI and Character.
It works fine if we run it through progress editor.
But when i attached it to menu in MFG/PRO ie character client.
It does not show any error message as well as does not create file.
 
But i am not able to see Opened excel file through Chracter interface menu program..
Can u see the opened excel file through charcter interface menu?
 
i cheked a program which opens excel file n does not create excel.

eg.
Define stream data-export.

DEFINE VARIABLE excelAppl AS COM-HANDLE.

CREATE "Excel.Application" excelAppl.

excelAppl:Visible=true.
excelAppl:Workbooks:OPEN('c:\mfgdemo\tt_temp.csv').

RELEASE OBJECT excelAppl.


OUTPUT STREAM data-export CLOSE.




It works by attaching it to character client menu.
so i guess in character client problem is ith creating excel file.
 

sanjus

Member
Hello There,

Currently, I am beta-testing my product "QADXL" which converts most of Mfg/Pro reports and some of the Inquiry screens and opens directly into Excel (sent via email as an excel attachment).

QADXL is a powerful and flexible and yet inexpensive tool to transform QAD's Mfg/Pro reports+ to Excel format straight out of the box, allowing your business analysts to focus on analyzing data rather than wasting valuable time importing or even re-keying it. You can improve data exchange process with your business partners by using Excel files generated by QADXL - a step in the direction towards paperless office.

Designed with end-user in mind, QADXL is easy to use. The users selects QADXL as the output destination & the tool converts more than hundred QAD's Mfg/Pro reports to Excel format directly at runtime. The converted Excel Report will be delivered as an attachment via email as soon as the report is completed in QAD's Mfg/Pro system.

Key Benefits
* QADXL will help you to better use the power of MFG/PRO reports by
converting it directly into Excel.
* Saves great deal of time and efforts, making you more productive and
efficient.
* Retains all Original report formatting.
* Very easy to use. Just select QADXL as your output destination.
* QADXL will improve data exchange processes across your company or with your business partners. You can send the information from your reports in Excel format.
* Rapid Setup & Immediate value-add

Technical Requirements:
* Supports Windows as well us *nix Operating Systems.
* Supports all QAD Mfg/Pro versions
* Supports all QAD user interfaces
* Requires some perl modules
* Requires reports source recompile

+ QADXL can convert most columnar, single frame reports, inquiry screens and complex reports like AR Aging, I/S, B/S to Excel.
+ QADXL will not convert reports like Registers, DR/CR Memo print.
+ Some reports might need minor customizations to work in QADXL. We can help you with reformatting of the standard QAD report (for a small fee).

I can provide you screen snapshots of how the product works.


sanju Shah
Founder and President, Creatine TS Inc.
sanju.shah@gmail.com
 
Top