I have an excel file that has some formatting in it that I
would like to preserve (some cells have background color, etc). I'd
like to remove a list of email addresses from this file. My first
thought is to use cffile with action read, use the following in a
excelFileVarCreatedFromCffileRead) and then save it back to excel
format with cffile using action write. I tried this and the Excel
file would not open. The error was:
test.xls cannot be accessed. The file may be read-only, or
you may be trying to access a read-only location. Or, the server
the document is stored on may not be responding.
I'm guessing something went wrong in the process of reading
and writing the files contents and it's not as simple as I want to
make it. Anyone have something to tell me that might help me remove
email addresses from a formatted Excel spreadsheet?
> I'm guessing something went wrong in the process of
reading and writing the
> files contents and it's not as simple as I want to make
it. Anyone have
> something to tell me that might help me remove email
addresses from a formatted
> Excel spreadsheet?
Yup, .xls is a proprietary encrypted file format and
<cffile.... is not
going to be able to successfully read and modify it's
content. You can
copy it or move it, but not modify it with <cffile...>
If the file format was a plain text such as .txt or .csv you
what you are thinking about, but then you would probably not
proprietary excel formating in the file.
I've heard about the POI library that allows some native
and such, but I am not knowledgeable in its ins and outs.