Mucking around with Excel documents

Richmond richmondmathewson at gmail.com
Wed Apr 17 05:08:21 EDT 2013


I made an Excel document by setting up a LibreOffice Calc document with 
9 cells containing data

[ one of these cells contained the word "silly" ]

and saved it in the Excel 2003 XML format.

I imported the XML file as a text file into a field, then ran this 
script from a button:

on mouseUp
    if fld "sample" contains "silly" then
       put fld "sample" into Ssample
       replace "silly" with "stupid" in Ssample
       put Ssample into fld "processed"
    end if
    open file "sampleMOD.xml"
    write Ssample to file "sampleMOD.xml"
end mouseUp

I then was able to open the exported Excel document in LibreOffice Calc 
again to find
that the cell that had contained the word "silly" now contained the word 
"stupid".

I am obviously slightly silly, having done that, because I cannot quite 
understand what the broohaha
is about modifying Excell documentf with Livecode:

seems dead easy to me!

Richmond.




More information about the use-livecode mailing list