Home
TeamSite
How can i create a doc file
Nidhi_Agrawal
I am facing the problemin creating a doc file including functionality of making letters bold,underline,italic.
This time i am able to read only the doc file using win32
LE module ..
Pls suggest me the way of solving this problem..
-nidhi
Find more posts tagged with
Comments
chuckles
I assume you are not running TeamSite on a Windows environment? Creating .doc files can be a bit difficult, but you can look into creating simpler RTF documents or using WordML (Word doc represented as XML).
Nidhi_Agrawal
Thanks for u'r kind suggestion.
Referring that i hv created a doc file with all the functionalities.
Regards
Nidhi..
Bhargav Coca
I am trying to do the same thing, can you please explain how did you acheive a word doc from teamsite. And i am on Windows.
Thank you
getnaren
Hi,
can you please explain me how did u create word doc from dct? I am using TS 6.5 SP2 on WLS 8.1
Naren
Nidhi_Agrawal
U can refer this thread for generation of doc file...
"
http://devnet.interwoven.com/forums/cgi-bin/showflat.pl?Cat=&Board=PRODUCTS_TEMPLATING&Number=65991&page=&view=&sb=&o=&vc=1"
Nidhi...
Bhargav Coca
Hey Nidhi,
You are reffering back to you post whihc i have Started. I had that question there, where i can create the word doc using your code. But the dynamic data from the DCR were not getting into the word doc. Did you work with dynamic data to generate your word documents? Please let me know, if you have done this, you can attach a small snippet which parses dynamic data from the dcr into the word doc.
Thank you
Nidhi_Agrawal
Try this tpl code..
<iw_pt name="FYIArticle"/>
<iw_perl>
$var=iwpt_dcr_value('dcr.FullPageContainer.FullPageItem.PageTitle');
$path='y:/default/main/SyncEx/WORKAREA/syncexwork/webroot/html/test.doc';
open(FH,">$path");
$str='<html xmlns
="urn:schemas-microsoft-com
ffice
ffice"
xmlns:w="urn:schemas-microsoft-com
ffice:word"
xmlns="
http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<title>This is the temp file </title>
<!--[if gte mso 9]><xml>
<o
ocumentProperties>
<o:Author>nidhia</o:Author>
<o:Template>Normal</o:Template>
<o:LastAuthor>nidhia</o:LastAuthor>
<o:Revision>1</o:Revision>
<o:TotalTime>2</o:TotalTime>
<o:Created>2005-09-15T05:10:00Z</o:Created>
<o:LastSaved>2005-09-15T05:11:00Z</o:LastSaved>
<o
ages>1</o
ages>
<o:Words>7</o:Words>
<o:Characters>45</o:Characters>
<o:Company> </o:Company>
<o:Lines>1</o:Lines>
<o
aragraphs>1</o
aragraphs>
<o:CharactersWithSpaces>55</o:CharactersWithSpaces>
<o:Version>9.2720</o:Version>
</o
ocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w
oNotOptimizeForBrowser/>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-alt:"\FF2D\FF33 \660E\671D";
mso-font-charset:128;
mso-generic-font-family:roman;
mso-font-format
ther;
mso-font-pitch:fixed;
mso-font-signature:1 134676480 16 0 131072 0;}
@font-face
{font-family:"Arial Black";
panose-1:2 11 10 4 2 1 2 2 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:647 0 0 0 159 0;}
@font-face
@{font-family:"\
@MS
Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-charset:128;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-1610612033 1757936891 16 0 131231 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
@page
Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page
ection1;}
-->
</style>
</head>
<body lang=EN-US style=\'tab-interval:.5in\'>
<div class=Section1>
<p class=MsoNormal><u><span style=\'mso-fareast-font-family:"MS Mincho"\'><![if !supportEmptyParas]> <![endif]><o
></o
></span></u></p>
<p class=MsoNormal><b><span style=\'mso-fareast-font-family:"MS Mincho"\'>
'.iwpt_output($var).
'<br>This is
for making bold characters.<o
></o
></span></b></p>
<p class=MsoNormal><i><span style=\'mso-fareast-font-family:"MS Mincho"\'>This is
for making italic characters.<o
></o
></span></i></p>
<p class=MsoNormal><u><span style=\'mso-fareast-font-family:"MS Mincho"\'>This is
ttttttttttttttttttttttttttttttttttt
ttttttttttttt
t
ttttttttttttttt
ttttttttttttttttt
ttttttttttttttttttttt
tttttttttttttttttttt
ttttttttttttttttttttttttt
tttttttttttttttttttttt
tttttttttttttttttttttt
ttttttttttttttttttttttt
tttttttttttttttttttttt
ggggggggggggggggggggg
gggggggggggggggg
ggggggggggggg
gggggggggggggggggggg
for making underlined characters.<o
></o
></span></u></p>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>gtgtgrgr
<p class=MsoNormal><b><i><span style=\'mso-fareast-font-family:"MS Mincho"\'>This
is for making bold italic characters.<o
></o
></span></i></b></p>
<p class=MsoNormal><b><u><span style=\'mso-fareast-font-family:"MS Mincho"\'>This
is for making bold underlined characters.<o
></o
></span></u></b></p>
<p class=MsoNormal><i><u><span style=\'mso-fareast-font-family:"MS Mincho"\'>This
is for making italic underlined characters.<o
></o
></span></u></i></p>
<p class=MsoNormal><span style=\'font-family:Century;mso-fareast-font-family:
"MS Mincho"\'>This is the type change.<o
></o
></span></p>
<p class=MsoNormal><span style=\'font-size:18.0pt;mso-bidi-font-size:12.0pt;
font-family:Century;mso-fareast-font-family:"MS Mincho"\'>This is the type
change.<o
></o
></span></p>
<p class=MsoNormal><span style=\'mso-fareast-font-family:"MS Mincho"\'><![if !supportEmptyParas]> <![endif]><o
></o
></span></p>
</div>
</body>
</html>
' ;
print FH $str;
close (FH);
iwpt_output("done");
</iw_perl>
Bhargav Coca
Thank you Nidhi, I have this working. But i have a question here, how can i append different values coming out of dcr? Well i can assign them in different variables and then use $string1 and append them. IS this what you have done. Please let me know.
Thank you
Adam Stoller
Where are you getting the different values from?
Treat the PT like a Perl program - write subroutines to handle blocks of code - each subroutine can retrieve the correct value from the DCR to include in the output stream.
I tend to write these so that each [major] subroutine is responsible for returning a string of text when gets concatenated with other strings of text, and then, at the very end, output the entire string of text.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Nidhi_Agrawal
Hi
I couldnt undersood your question clearly... but up to what i am able to undertand, Mr. Adam Stoller's reply seems appropriate. you can write the subroutines to get the Values from DCR and use these retrived values to generate the strings. Or simple you can retrive the values from DCR and concate it.
-Nidhi
Bhargav Coca
Yes, I am considering that option too, but here is what happening, Consider this code, all i have done here is added one more variable for a value coming from the dcr.
Try this tpl code..
<iw_pt name="FYIArticle"/>
<iw_perl>
$var=iwpt_dcr_value('dcr.FullPageContainer.FullPageItem.PageTitle');
$var1=iwpt_dcr_value('dcr.FullPageContainer.FullPageItem.PageNumber');
$path='y:/default/main/SyncEx/WORKAREA/syncexwork/webroot/html/test.doc';
open(FH,">$path");
$str='<html xmlns
="urn:schemas-microsoft-com
ffice
ffice"
xmlns:w="urn:schemas-microsoft-com
ffice:word"
xmlns="
http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<title>This is the temp file </title>
<!--[if gte mso 9]><xml>
<o
ocumentProperties>
<o:Author>nidhia</o:Author>
<o:Template>Normal</o:Template>
<o:LastAuthor>nidhia</o:LastAuthor>
<o:Revision>1</o:Revision>
<o:TotalTime>2</o:TotalTime>
<o:Created>2005-09-15T05:10:00Z</o:Created>
<o:LastSaved>2005-09-15T05:11:00Z</o:LastSaved>
<o
ages>1</o
ages>
<o:Words>7</o:Words>
<o:Characters>45</o:Characters>
<o:Company> </o:Company>
<o:Lines>1</o:Lines>
<o
aragraphs>1</o
aragraphs>
<o:CharactersWithSpaces>55</o:CharactersWithSpaces>
<o:Version>9.2720</o:Version>
</o
ocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w
oNotOptimizeForBrowser/>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-alt:"\FF2D\FF33 \660E\671D";
mso-font-charset:128;
mso-generic-font-family:roman;
mso-font-format
ther;
mso-font-pitch:fixed;
mso-font-signature:1 134676480 16 0 131072 0;}
@font-face
{font-family:"Arial Black";
panose-1:2 11 10 4 2 1 2 2 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:647 0 0 0 159 0;}
@font-face
@{font-family:"\
@MS
Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-charset:128;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-1610612033 1757936891 16 0 131231 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
@page
Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page
ection1;}
-->
</style>
</head>
<body lang=EN-US style=\'tab-interval:.5in\'>
<div class=Section1>
<p class=MsoNormal><u><span style=\'mso-fareast-font-family:"MS Mincho"\'><![if !supportEmptyParas]> <![endif]><o
></o
></span></u></p>
<p class=MsoNormal><b><span style=\'mso-fareast-font-family:"MS Mincho"\'> '.iwpt_output($var). '<br>This is
for making bold characters.<o
></o
></span></b></p>
<p class=MsoNormal><i><span style=\'mso-fareast-font-family:"MS Mincho"\'> '.iwpt_output($var1). '<br>This is
for making italic characters.<o
></o
></span></i></p>
<p class=MsoNormal><u><span style=\'mso-fareast-font-family:"MS Mincho"\'>This is
ttttttttttttttttttttttttttttttttttt
ttttttttttttt
t
ttttttttttttttt
ttttttttttttttttt
ttttttttttttttttttttt
tttttttttttttttttttt
ttttttttttttttttttttttttt
tttttttttttttttttttttt
tttttttttttttttttttttt
ttttttttttttttttttttttt
tttttttttttttttttttttt
ggggggggggggggggggggg
gggggggggggggggg
ggggggggggggg
gggggggggggggggggggg
for making underlined characters.<o
></o
></span></u></p>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>gtgtgrgr
<p class=MsoNormal><b><i><span style=\'mso-fareast-font-family:"MS Mincho"\'>This
is for making bold italic characters.<o
></o
></span></i></b></p>
<p class=MsoNormal><b><u><span style=\'mso-fareast-font-family:"MS Mincho"\'>This
is for making bold underlined characters.<o
></o
></span></u></b></p>
<p class=MsoNormal><i><u><span style=\'mso-fareast-font-family:"MS Mincho"\'>This
is for making italic underlined characters.<o
></o
></span></u></i></p>
<p class=MsoNormal><span style=\'font-family:Century;mso-fareast-font-family:
"MS Mincho"\'>This is the type change.<o
></o
></span></p>
<p class=MsoNormal><span style=\'font-size:18.0pt;mso-bidi-font-size:12.0pt;
font-family:Century;mso-fareast-font-family:"MS Mincho"\'>This is the type
change.<o
></o
></span></p>
<p class=MsoNormal><span style=\'mso-fareast-font-family:"MS Mincho"\'><![if !supportEmptyParas]> <![endif]><o
></o
></span></p>
</div>
</body>
</html>
' ;
print FH $str;
close (FH);
iwpt_output("done");
</iw_perl>
Here no matter i specify iwpt_output($var1) , both values of $var and $var1 are getting displayed. I donno why. Please help me resolve this.
Thank you
jbonifaci
I think you are going about this all wrong. If you want to print to the file you've opened, why are you using iwpt_output? Try replacing the above code with the code below and see if you get better results. The code below will output your two variables to your file instead of using iwpt_output.
my $pageTitle = iwpt_dcr_value('dcr.FullPageContainer.FullPageItem.PageTitle');
my $pageNumber = iwpt_dcr_value('dcr.FullPageContainer.FullPageItem.PageNumber');
my $filePath = 'Y:/default/main/SyncEx/WORKAREA/syncexwork/webroot/html/test.doc';
open(FILEHANDLE, ">$filePath");
my $fileContent = <<FILE_CONTENT;
<html xmlns
="urn:schemas-microsoft-com
ffice
ffice"
xmlns:w="urn:schemas-microsoft-com
ffice:word"
xmlns="
http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<title>This is the temp file </title>
<!--[if gte mso 9]><xml>
<o
ocumentProperties>
<o:Author>nidhia</o:Author>
<o:Template>Normal</o:Template>
<o:LastAuthor>nidhia</o:LastAuthor>
<o:Revision>1</o:Revision>
<o:TotalTime>2</o:TotalTime>
<o:Created>2005-09-15T05:10:00Z</o:Created>
<o:LastSaved>2005-09-15T05:11:00Z</o:LastSaved>
<o
ages>1</o
ages>
<o:Words>7</o:Words>
<o:Characters>45</o:Characters>
<o:Company> </o:Company>
<o:Lines>1</o:Lines>
<o
aragraphs>1</o
aragraphs>
<o:CharactersWithSpaces>55</o:CharactersWithSpaces>
<o:Version>9.2720</o:Version>
</o
ocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w
oNotOptimizeForBrowser/>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-alt:"\FF2D\FF33 \660E\671D";
mso-font-charset:128;
mso-generic-font-family:roman;
mso-font-format
ther;
mso-font-pitch:fixed;
mso-font-signature:1 134676480 16 0 131072 0;}
@font-face
{font-family:"Arial Black";
panose-1:2 11 10 4 2 1 2 2 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:647 0 0 0 159 0;}
@font-face
@{font-family:"\
@MS
Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;
mso-font-charset:128;
mso-generic-font-family:modern;
mso-font-pitch:fixed;
mso-font-signature:-1610612033 1757936891 16 0 131231 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Courier New";
mso-fareast-font-family:"Times New Roman";}
@page
Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page
ection1;}
-->
</style>
</head>
<body lang=EN-US style='tab-interval:.5in'>
<div class=Section1>
<p class=MsoNormal><u><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]> <![endif]><o
></o
></span></u></p>
<p class=MsoNormal><b><span style='mso-fareast-font-family:"MS Mincho"'>$pageTitle<br>This is
for making bold characters.<o
></o
></span></b></p>
<p class=MsoNormal><i><span style='mso-fareast-font-family:"MS Mincho"'>$pageNumber<br>This is
for making italic characters.<o
></o
></span></i></p>
<p class=MsoNormal><u><span style='mso-fareast-font-family:"MS Mincho"'>This is
ttttttttttttttttttttttttttttttttttt
ttttttttttttt
t
ttttttttttttttt
ttttttttttttttttt
ttttttttttttttttttttt
tttttttttttttttttttt
ttttttttttttttttttttttttt
tttttttttttttttttttttt
tttttttttttttttttttttt
ttttttttttttttttttttttt
tttttttttttttttttttttt
ggggggggggggggggggggg
gggggggggggggggg
ggggggggggggg
gggggggggggggggggggg
for making underlined characters.<o
></o
></span></u></p>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>gtgtgrgr
<p class=MsoNormal><b><i><span style='mso-fareast-font-family:"MS Mincho"'>This
is for making bold italic characters.<o
></o
></span></i></b></p>
<p class=MsoNormal><b><u><span style='mso-fareast-font-family:"MS Mincho"'>This
is for making bold underlined characters.<o
></o
></span></u></b></p>
<p class=MsoNormal><i><u><span style='mso-fareast-font-family:"MS Mincho"'>This
is for making italic underlined characters.<o
></o
></span></u></i></p>
<p class=MsoNormal><span style='font-family:Century;mso-fareast-font-family:
"MS Mincho"'>This is the type change.<o
></o
></span></p>
<p class=MsoNormal><span style='font-size:18.0pt;mso-bidi-font-size:12.0pt;
font-family:Century;mso-fareast-font-family:"MS Mincho"'>This is the type
change.<o
></o
></span></p>
<p class=MsoNormal><span style='mso-fareast-font-family:"MS Mincho"'><![if !supportEmptyParas]> <![endif]><o
></o
></span></p>
</div>
</body>
</html>
FILE_CONTENT
print FILEHANDLE $fileContent;
close(FILEHANDLE);
iwpt_output("done");
~Jeff
Bhargav Coca
This is not working, ITs giving me a TPL error.
Thank you
jbonifaci
Can you please
attach
your tpl file?
Bhargav Coca
Here is the tpl file.
Thank You
jbonifaci
What error are you getting? The here doc looks like it got a little messed up with the copy and paste. Make sure that there is no white space following the FILE_CONTENT line and try again.
~Jeff
Bhargav Coca
Spaces are always a problem. I have it working now. I am trying to create word doc with several pages. I'll keep you posted.
Thank you
Adam Stoller
...
my $filePath = 'Y:/default/main/SyncEx/WORKAREA/syncexwork/webroot/html/test.doc';
open(FILEHANDLE, ">$filePath");
...
The main problem with this is that if one goes to edit the generated Word file - they'll be editing the Word file and not the DCR from whence it was generated. If
iwpt_output()
is used (and
.doc
is the expected output file type for the PT) then attempting to edit the Word file (within TeamSite) will [should] take you to the DCR.
True - you could do the FILEHANDLE bit and then set the EAs yourself to achieve the same result but the way you have it written - the output file with the contents of "done" might overwrite the Word file -- if the Word file and the output file are the same.
If the Word file is meant as a
secondary
output from the DCR - then using the FILEHANDLE makes more sense - you'll still probably want to set the EAs on it though.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
jbonifaci
Not sure if you meant this for me or lillywhite, but I realize the approach being used has a few flaws. I was only helping with the immediate problem, didn't want to open up a can of worms
.
~Jeff
Bhargav Coca
Thank you guys, Well Word is an other alternate output here. Cuz my client wants to print the generated file which looks like a word in my generated html file, But when he prints it, the pages doesn't print as he wanted, so he asked me to write it into a word doc so that he can print the word doc. And there are no EA's in this file, so for now the File handling is fine, I guess. What do you guys think?
Thank you
Bhargav Coca
How can i pass this value into the TPL from outside depending on the DCR Name?
my $filePath = 'Y:/default/main/SyncEx/WORKAREA/syncexwork/webroot/html/test.doc';
Thank you in advance
jbonifaci
Well, you can't pass it into the TPL, but you can get information from the DCR to generate the value. Do you just want to base it on DCR name? Just use the DCR name as the document name?
~Jeff
Bhargav Coca
yes i was thinking in that terms, I can do it in a ipl which will be included in an external task in the workflow. But with in the tpl the word document which is generate, the entire path is specified in the file, there should be a means to pass that entire path from inside the ipl file into the tpl for successful generation of my word doc. Just donno how to do this part of passing the entire path inside the tpl.
Thank you
jbonifaci
How are you planning on generating the path? As I said, instead of passing the path in, can't you generate it in the TPL from the information in the DCR? This would seem easier than trying to pass something in.
If you're doing this via a workflow though, I'm assuming you're using iwpt_compile.ipl? If so, read up on -iw_pt-arg, you should be able to pass the path in using this.
~Jeff