djmc48
06-17-2003, 08:41 AM
Hello all,
Im dynamically creating an excel spreadsheet file through javascript, using data that I queried from a database and returned to the javasript function. I can create an excel file by using the following code...
var filename = "data.xls";
var fso = new ActiveXObject("Scripting.FileSystemObject");
var file = fso.CreateTextFile(filename, true);
file.WriteLine('<table border="1" cellspacing="0">');
file.WriteLine('<th bgcolor="#00CCFF">title1</th>');
file.WriteLine('<tr><td>row1col1</td></tr>');
file.WriteLine('</table>');
...
and so on. Excel recognizes this, and brings everything up just fine. This is just a total shot in the dark, but does anyone know if there is something that I can do to a column so that excel will use a function for that column, or am I stuck manually putting in all of the functions after the script makes the file?
Thanks,
dj
Im dynamically creating an excel spreadsheet file through javascript, using data that I queried from a database and returned to the javasript function. I can create an excel file by using the following code...
var filename = "data.xls";
var fso = new ActiveXObject("Scripting.FileSystemObject");
var file = fso.CreateTextFile(filename, true);
file.WriteLine('<table border="1" cellspacing="0">');
file.WriteLine('<th bgcolor="#00CCFF">title1</th>');
file.WriteLine('<tr><td>row1col1</td></tr>');
file.WriteLine('</table>');
...
and so on. Excel recognizes this, and brings everything up just fine. This is just a total shot in the dark, but does anyone know if there is something that I can do to a column so that excel will use a function for that column, or am I stuck manually putting in all of the functions after the script makes the file?
Thanks,
dj