Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel
Hi,
Background: I'm writing a C++ application which exports data to Excel using Automation in Visual Studio C++ 6.0. I created a .dll which includes all of the automation, which I just have to send an array of data to and formatting instructions. I have one cell in each export which is a formula. The formula (in Excel 2003 and Excel '97) turns out to look like this in the exported spreadsheet: "{=SUM(B1:B1999)}" All of the numbers in column B are set as type "General". The sum works in 2003, but not in '97. The fix for '97 is to do one of two things: 1.) Retype all cells. "Return" and changing the type to "Number" do not work...but retyping them all does. 2.) Change it to "{=SUM(B1:B1999+0)}" and then press "Ctrl + Shift + Enter" while still in the cell. What I need to know is, why does number 2 work? Is there anything else I should try so this can be automated without human intervention? Thanks guys (and gals)! -Benry |