All Excel C++ Interop Interfacing Visualisation here

Daniel Duffy

C++ author, trainer
And note incorrect and correct calls. (Check your ExcelDriver.cpp)

Code:
//Excel::_WorksheetPtr sheet = workbook->Worksheets->GetItem("Sheet1");
Excel::_WorksheetPtr sheet = workbook->Worksheets->GetItem(1); //Language-independent
 

alain

Older and Wiser
And note incorrect and correct calls. (Check your ExcelDriver.cpp)

Code:
//Excel::_WorksheetPtr sheet = workbook->Worksheets->GetItem("Sheet1");
Excel::_WorksheetPtr sheet = workbook->Worksheets->GetItem(1); //Language-independent
doesn't it make it placement dependent? I don't think that's necessarily an incorrect call
 

alain

Older and Wiser
Using "Sheet1" only works with the English version of Excel.
I don't disagree with that. However, using the ordinal number assumes you are looking at the first sheet. If a new sheet is inserted the code stops working. I rather use the name since Sheet1 is going to change to something meaningful (you don't plan to keep Sheet1, correct?) and you can use whatever name you picked going forward.

If you keep the name of the worksheet you are interacting with as Sheet1, Sheet2, etc, we are ready for a more meaningful discussion.
 

Daniel Duffy

C++ author, trainer
I don't disagree with that. However, using the ordinal number assumes you are looking at the first sheet. If a new sheet is inserted the code stops working. I rather use the name since Sheet1 is going to change to something meaningful (you don't plan to keep Sheet1, correct?) and you can use whatever name you picked going forward.

If you keep the name of the worksheet you are interacting with as Sheet1, Sheet2, etc, we are ready for a more meaningful discussion.
Well, I would like to but "Sheet1" will crash non-English versions.

The name is not so important for visualisation at the moment, the latter being the objective in the C++ course.
 

alain

Older and Wiser
Well, I would like to but "Sheet1" will crash non-English versions.

The name is not so important for visualisation at the moment, the latter being the objective in the C++ course.
in that case, change the name. That's what needs to be done.
 

Daniel Duffy

C++ author, trainer
any name that conveys the content of the worksheet. Sheet1 is definitely not a good one though.
In general, yes. It would be a s/w change control request.
The name occurs in a specific context and using 1 is OK. It is possible to change the name afterwords if need be.
 

ExSan

Active Member
I am using MS Visual Studio Express 2013, it seems to be not compatible
the file generated by the compiler .... debug\vbe6ext.tli
has this label
// Created by Microsoft (R) C/C++ Compiler Version 12.00.21005.1 (cbedc806). hence the error ?
 
Last edited:

tagoma

Member
compiler says
fatal error C1083: Cannot open type library file: 'C:\Program Files(x86)\Common Files\microsoft shared\OFFICE14\mso.dll': No such file or directory

but it is there !
Couldn't this simply be due to admin restrictions?
 

Daniel Duffy

C++ author, trainer
Couldn't this simply be due to admin restrictions?
Indeed

1. No file (hint: check file _is_ on disk)
2, Wrong access rights

3. Maybe you have a Express (by definition, Express < Full).
4. file is somewhere else?
 
Last edited:

ExSan

Active Member
I don't remember the last time I used MS Excel, Google Sheets are the trend
 

Daniel Duffy

C++ author, trainer
I don't remember the last time I used MS Excel, Google Sheets are the trend
Excel is still a standard. Traders use Excel a lot.

Anyways, I built the ExcelDriver in C++ and C# to display FDM output. It's cool.
 
Top