How to transfer generated numbers from my XLSM to report?

User-to-User discussion about the PhraseExpress macro programming.
Forum rules
Please read the forum disclaimer. Thank you!
Post Reply
dhous07
Posts: 5
Joined: 02 Dec 16, 01:40

How to transfer generated numbers from my XLSM to report?

Post by dhous07 » 01 Oct 17, 22:15

I have XLSM file (see attached) and want to get the data from cells to populate my report. How to do it?

My result text should look like as follows

Histological tumour type: Acinar adenocarcinoma

Number of cores involved.
Right 5 out of 5
Left 5 out of 5
Apical 5 out of 5

Total number of cores involved: 10 out of 10.
Greatest length of cancer in one core: 15 mm Location left
Greatest percentage of cancer in one core: 100% Location: left
Percentage of cancer in all cores: 85-90 %

Perineural invasion: Present
Invasion into adipose tissue: Present

Gleason score:
Primary Gleason grade: 4
Secondary Gleason grade: 5
Gleason score: 4 + 5 = 9
Grade Group: 5
You do not have the required permissions to view the files attached to this post.

Peter Stotz
PhraseExpress Expert
Posts: 564
Joined: 27 Feb 08, 15:07

Re: How to transfer generated numbers from my XLSM to report?

Post by Peter Stotz » 04 Oct 17, 14:48

Hi dhous07,
I think you need to insert the data from the Excel spreadsheet into the prepared report:
{#XML ...} inserts an XML file value.
For more information on this subject see:
http://www.phraseexpress.com/docs12/09/ ... llcontents

Peter
Win 10-1607 64 bit - PhraseExpress 13.0.41i-Beta

dhous07
Posts: 5
Joined: 02 Dec 16, 01:40

Re: How to transfer generated numbers from my XLSM to report?

Post by dhous07 » 04 Oct 17, 20:03

Peter, please could you make an example how to for example insert content of cell C31 from my xlsm file at the end of phrase Greatest percentage of Tumour: .... in real time?

Can I have excel file open and running along PE and it will populate my phrase in PE? Or how it works?

Peter Stotz
PhraseExpress Expert
Posts: 564
Joined: 27 Feb 08, 15:07

Re: How to transfer generated numbers from my XLSM to report?

Post by Peter Stotz » 04 Oct 17, 23:08

Hi, dhous07
Workflow:
Entering values in the Excel application
Save the Excel application
Switch to the report application.
Execute the report phrase.

Phrase example - Please adjust the file specification!
col 3 corresponds to column C:

Code: Select all

Greatest percentage of Tumour: {#calc {#xls -col 3 -row 31 -file D:\temp\Prostate_report_generator.xlsm} *100 -round 0} %
Can I have excel file open and running along PE and it will populate my phrase in PE?
You can keep the Excel worksheet open, but PhraseExpress can only read saved data from worksheets.
Therefore, press 'Save' before executing the phrase ...

Peter
Win 10; PhraseExpress 13.0.41i-Beta

dhous07
Posts: 5
Joined: 02 Dec 16, 01:40

Re: How to transfer generated numbers from my XLSM to report?

Post by dhous07 » 04 Oct 17, 23:37

Do I need to use absolute path or I can use relative path for Excel file? If I have USB version of PE I cannot predicted the name of drive to be assigned.

Peter Stotz
PhraseExpress Expert
Posts: 564
Joined: 27 Feb 08, 15:07

Re: How to transfer generated numbers from my XLSM to report?

Post by Peter Stotz » 06 Oct 17, 11:10

Hi dhous07,
relative file paths are available for portable use since PhraseExpress v12.0.128.
And: The proof of the pudding is in the eating... ;-)

Peter
Win 10-1607 64 bit - PhraseExpress 13.0.41i-Beta

Post Reply