write RTFText of a field works on a Word file but not on an Excel file

Eric Chatonet eric.chatonet at sosmartsoftware.com
Fri Apr 25 09:36:58 EDT 2008


Bonjour André,

Unfortunately, this is normal:
Excel is a number processor not a word processor ;-)
AFAIK I don't know if it is possible to export to Excel something  
different from a tab/tab/return text file, i.e. the minimum.
Excel uses its own internal format (that depends in addition of the  
version): probably some others on this list will be able to tell you  
more but MS products are always a mess ;-)

Le 25 avr. 08 à 15:27, Andre.Bisseret a écrit :

> Hi,
>
> I have a stack where I export the content of a field (fldSource)  
> into a Word file (thisWordFile.doc) which is in "thisFolder" on the  
> desktop.
>
> I have the following script in a button:
>
> ON mouseUp
>
> set the defaultfolder to specialfolderpath("desktop") & "/thisFolder"
>
>   open file "ThisWordFile.doc" FOR write
>
>   write the rtftext of fld "fldSource" to file " ThisWordFile.doc "
>
>   close file "ThisWordFile.doc"
>
>   launch document "ThisWordFile.doc"
>
> END mouseUp
>
> This script is working as expected : the text of the fldSource is  
> imported in the file "thisWordFile" keeping all formatting  
> features : colors, underline, italic, bold.
>
> Now, I am trying to do the same but in Excel : exporting the  
> content of a field "FldSource" in an Excel file (thisExcelFile.xls)  
> which is in the same folder (thisFolder).
>
> Then a strickly identical script (only changing the file: a file «  
> ThisExcelFile.xls » instead of "ThisWordFile.doc") does not work. I  
> don't keep the formatted text of the field in the Excel file; I get  
> the rtf code of the text :-((
>
> Thank in advance for any help,
>
> Best regards from Grenoble
>
> André


Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------





More information about the use-livecode mailing list