Click here to Skip to main content
15,887,416 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBackground color of a property page Pin
Farhat Aisha27-Mar-07 0:56
Farhat Aisha27-Mar-07 0:56 
AnswerRe: Background color of a property page Pin
prasad_som27-Mar-07 2:20
prasad_som27-Mar-07 2:20 
QuestionUsing Excel from C++ Pin
BusyDeveloper27-Mar-07 0:44
BusyDeveloper27-Mar-07 0:44 
AnswerRe: Using Excel from C++ Pin
Roger Stoltz27-Mar-07 2:30
Roger Stoltz27-Mar-07 2:30 
GeneralRe: Using Excel from C++ Pin
BusyDeveloper27-Mar-07 20:12
BusyDeveloper27-Mar-07 20:12 
QuestionRe: Using Excel from C++ Pin
Roger Stoltz27-Mar-07 20:47
Roger Stoltz27-Mar-07 20:47 
AnswerRe: Using Excel from C++ Pin
BusyDeveloper27-Mar-07 22:09
BusyDeveloper27-Mar-07 22:09 
GeneralRe: Using Excel from C++ Pin
Roger Stoltz27-Mar-07 23:01
Roger Stoltz27-Mar-07 23:01 
aoe wrote:
I read some 30 Excel files. Amount of data in each file varies from 50 to 600 cells.


The amount of data is ridiculously small. Wink | ;)
In my case it was a couple of hundred thousand cells.

What takes time in your case is probably dealing with so many different Excel files.
For each file you have to make a large number of calls to Excel before you can actually read the data. Reading the data in this case is neglectable in the aspect of required CPU time.


aoe wrote:
currently our customer is very happy with Excel....and I don't want to build a front end interface for another method.


I can appreciate that. Using Excel for such purpose can be justified in many ways so in my opinion you shouldn't change that approach unless being forced to for some reason.


aoe wrote:
Do you have some criteria to decide when to stop improving that way.....and go to another method?


Well, a kind of.
I usually think that when things get unreasonably complicated I suspect that I'm doing something wrong and try to find another way to do it. This is mainly at design level.

If I was in your situation I would first measure what operations that consume the most CPU time by measuring it to prevent me from solving the wrong problem. I would compare the amount of time required for opening the files to the time required for reading the data. I would expect to find that opening the files is the culprit by far, but I would like to make sure.
If I would find that opening the files is the performance bottleneck, I would try opening the files directly instead of using Excel for that. This can get somewhat complicated and you would have to know the Excel file format.
You can find the Excel file format here[^], but there's another thing that you have to care about: given the complexity of this solution you have to get approval from your customer before starting.
You have to ask your customer if he/she think it's worth 2-4 weeks of implementation to save those 4 seconds and still using Excel. The amount of time it will take is dependant on your skill and how generic you want the solution.


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown

GeneralRe: Using Excel from C++ Pin
BusyDeveloper28-Mar-07 22:46
BusyDeveloper28-Mar-07 22:46 
QuestionDestroyWindow & Focus Pin
baerten27-Mar-07 0:15
baerten27-Mar-07 0:15 
QuestionAbout storing file content Pin
siddharthsan26-Mar-07 23:37
siddharthsan26-Mar-07 23:37 
AnswerRe: About storing file content Pin
David Crow27-Mar-07 2:54
David Crow27-Mar-07 2:54 
Questionto call GlobalAlloc Pin
zon_cpp26-Mar-07 23:17
zon_cpp26-Mar-07 23:17 
AnswerRe: to call GlobalAlloc Pin
toxcct26-Mar-07 23:21
toxcct26-Mar-07 23:21 
GeneralRe: to call GlobalAlloc Pin
zon_cpp27-Mar-07 0:03
zon_cpp27-Mar-07 0:03 
GeneralRe: to call GlobalAlloc Pin
toxcct27-Mar-07 0:12
toxcct27-Mar-07 0:12 
QuestionRe: to call GlobalAlloc Pin
zon_cpp27-Mar-07 0:27
zon_cpp27-Mar-07 0:27 
AnswerRe: to call GlobalAlloc Pin
toxcct27-Mar-07 0:33
toxcct27-Mar-07 0:33 
GeneralRe: to call GlobalAlloc [modified] Pin
zon_cpp27-Mar-07 1:11
zon_cpp27-Mar-07 1:11 
GeneralRe: to call GlobalAlloc Pin
toxcct27-Mar-07 2:02
toxcct27-Mar-07 2:02 
GeneralRe: to call GlobalAlloc Pin
zon_cpp27-Mar-07 2:38
zon_cpp27-Mar-07 2:38 
GeneralRe: to call GlobalAlloc Pin
toxcct27-Mar-07 2:42
toxcct27-Mar-07 2:42 
GeneralRe: to call GlobalAlloc Pin
zon_cpp27-Mar-07 2:46
zon_cpp27-Mar-07 2:46 
GeneralRe: to call GlobalAlloc Pin
_808627-Mar-07 3:28
_808627-Mar-07 3:28 
GeneralRe: to call GlobalAlloc Pin
toxcct27-Mar-07 3:44
toxcct27-Mar-07 3:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.