Exporting to Microsoft Excel

From: Charles Evans (charles_evans_at_hotmail.com)
Date: 10/05/04


Date: Tue, 5 Oct 2004 17:15:13 +0100

Hi there,

Currently I have a piece of code that exports data to an Excel spread***.
This is all good and well except for the fact that, even though the data
being exported is numeric, Excel prefixes the data with an apostrophe and
this makes the data completely useless when it comes to formulas within
Excel. After some searching I found that the way to overcome this problem
is to create the work*** in Excel using CREATE TABLE syntax and to pass
through the data types for each of the columns. Wooohoooo....or so i
thought.

In the original application the spread*** is created from a template
stored in a resource which applies formatting to the column headers and
other parts of the spread***. Now, because I am creating the *** from
scratch, it doesn't have any formatting and I can't figure out how to format
a *** without using Excel Automation. I was hoping some bright spark out
there might have some ideas of how i can get around this problem without the
need for Excel Automation (yuck!). I originally thought of using a macro
for when the *** is created but then there is the security issue with end
users and macros.

Any suggestions or pointers would be greatly appreciated.

ciao,
-c.