Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default C++ automation problem

I'm using VC++ 6 to automate excel. I created a DLL that will make and
populate a workbook with some input data. Once of the parameters to
the function that creates and populates is a double pointer of
CStrings, which is basically a 2D array of all cell values. In the
last row, I want to send the SUM function to add all cells in the same
column is it. The CString is correctly formatted as

CString sString.Format("=SUM(G1:G%d)",dNumRows);

Where dNumRows is the number of rows in that particular spreadsheet.
Since the number of rows changes depending on how much data there is in
the backend DBs, which will grow in the future. Anyway.

In the actual spreadsheet, the cell that is supposed to contain this
string actually contains (in the formula bar) something that looks like
this:

for dNumRows = 1000,
{=SUM(M1000:M1999)}
for dNumRows = 820:
{=SUM(M1820:M1645)}

Why are there curly brackets? Why is my input string mangled with only
the data as the SUM parameters? Does this have something to do with
the version of Excel I'm using? (2003, btw). Thanks for any info.

-Benry

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Automation Problem With Add-Ins pagates Excel Programming 4 October 6th 05 05:18 PM
Automation problem Tim Long Excel Programming 5 July 20th 05 03:51 PM
Problem in graph automation in excel. news.microsoft.com[_7_] Excel Programming 3 April 30th 05 06:02 AM
Automation Add-in Distribution problem kumar_8675[_4_] Excel Programming 1 November 5th 04 02:09 AM
TypeConverter Excel-Automation problem Markus Excel Programming 0 August 23rd 04 11:17 AM


All times are GMT +1. The time now is 11:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"