In article
<657cf183-daee-4ea4-aa45->,
<""> wrote:
> I am reading a set of strings, and then writing them out to an Excel
> sheet using WriteExcel module. Some strings seem to have the format of
> a formula, and the module is trying to parse them and failing. I would
> like to write the strings as they are, but can live with it if I just
> force such strings to be blank and then print them.
Are you talking about the Spreadsheet::WriteExcel module?
If so, then according to the documentation for the write module:
"Excel makes a distinction between data types such as strings, numbers,
blanks, formulas and hyperlinks. To simplify the process of writing
data the write() method acts as a general alias for several more
specific methods:
write_string()
write_number()
write_blank()
write_formula()
write_url()
write_row()
write_col()
The general rule is that if the data looks like a something then a
something is written. Here are some examples in both row-column and A1
notation:"
The documentation then shows that if you use the write method to write
a string that begins with an equal sign, it will use the write_formula
method to write it to the workbook, with these examples:
$worksheet->write('A12', '=A3 + 3*A4' ); # write_formula()
$worksheet->write('A13', '=SIN(PI()/4)' ); # write_formula()
So, you might try forgoing use of the general write method and use the
write_string method instead.
--
Jim Gibson
|